On time means that there is a specific time established when something is supposed/expected to happen, and it is happening at the planned time.
- My job interview is scheduled for 4:00 PM.
If I arrive at 4:00 PM, I am on time for the interview.
- The flight is scheduled to leave at 10:30 AM.
If it leaves at 10:30 AM, the flight is leaving on time.
- The class is supposed to start at 9:00.
If it does start at 9:00 with no delays, it is starting on time.
If you say “He’s always on time” it means he is punctual; he always arrives at the correct time, he is not late.
If you say “He’s never on time” it means he is always late.
In time means that something happened at the last moment before it was too late; before something bad would happen.
- The accident victim was seriously injured; they got him to the hospital just in time.
(If they hadn’t arrived at the hospital, he might have died)
- I missed the opportunity to go to that college because I didn’t submit my application in time.
- I left home early and arrived in plenty of time to catch my flight.
- I got stuck in traffic and arrived just in time to catch my flight.
We often say “just in time” to emphasize that something happened immediately before the limit/deadline, as you can see by comparing the last two example sentences.
There’s also the expression “in the nick of time” which even further emphasizes something happening at the last moment, immediately before the limit/deadline:
- The teacher said we had to turn our assignments in by 4:00 PM. I e-mailed her my paper at 3:58 – in the nick of time!
- In movies, a specialist often disarms a bomb in the nick of time, with just a few seconds left on the countdown.