On time means ‘at the planned time’. If you are ‘on time’, you are neither late nor early. The opposite is early or late.
- The train arrived on time. (It was neither early nor late.)
- We want the meeting to start exactly on time.
In time means ‘before the last moment’. The opposite is ‘too late’.
- We arrived there in time.
- He would have died if they hadn’t got him to hospital in time.