On time = punctual, not late. If something happens on time, it happens at the time which was planned:
- The 11:45 train left on time. (= it left at 11:45)
- I’ll meet you at 7:30, but please be on time. (= don’t be late, be there at 7:30)
- The conference was well-organized. Everything began and finished on time.
The opposite of on time is late:
- Be on time. Don’t be late.
In time (for something / to do something) = soon enough
- Will you be home in time for dinner? (= soon enough for dinner)
- I’ve sent Emma a birthday present. I hope it arrives in time (for her birthday). (= on or before her birthday)
- I’m in a hurry. I want to be home in time to see the game on TV.
The opposite of in time is too late:
- I got home too late to see the game on TV.
You can say just in time (=almost too late):
- We got to the station just in time for our train.
- A child ran into the road in front of the car – I managed to stop just in time.