Hello Nuria, I don't think you'll get in any trouble if you switch between the expressions, but in my experience, "on time" is used when you are talking about something that is scheduled to happen at a specific time, ("the package was delivered on time") and that's the end of it, while "in time" usually means something happened so that it was ready for something to else happen, ("thankfully, I arrived in time to catch my flight at the airport"). Sulaiman's example is good, if you arrive before 10:00 you have arrived "in time" to make your meeting (you are ready for your meeting). Hope that helps, I'm new here :)