So between the change of phases within the matter(solid liquid gas), the temperature reaches a plateau, no matter how much heat you add to it, it just stays the same. Where did all those energy go?
You may have learnt at some point that a change of phase is endothermic (i.e. needs heat to happen). So, when you transition from a phase to another and keep adding heat, the temperature will remain the same, as all the heat you'll add will be used for the change of phase. Hence, the temperature will remain the same until the transition is over (i.e. you gave your system enough heat for the transition to be complete), then will vary again.