"in time" means before an event happens. Example: I got on the bus just in time. It was going to leave without me. If you didn't make it "in time" something negative would happen. In the example, the bus would have left. Another example: He arrived in time for dinner. If he had come any later everyone would have already eaten.
"on time" means you arrived at the exact moment you were supposed to. You were not late and you were not early. It does not imply something negative would happen if you were not there at that moment. It is just stating a fact.
- For Teachers