For any substance, why does the temperature remain constant during the change of state?
Energy is required for a substance to change from one state to another.
When we provide heat energy to a substance, it's temperature increases.
After a certain point, the temperature becomes constant.
This is because the heat energy which was initially being used to increase the temperature is now being used to change the state of the substance(overcoming the force of attraction between the particles of the substance).
This heat is known as latent heat.