This is an elementary question but I do not know the answer to it. During a phase transition such as melting a solid to a liquid the temperature remains constant. At any lower temperature the heat provided went to kinetic energy and intermolecular potential energy. Why is it that at the melting point no energy goes into kinetic (that would increase the temperature)?
Imagine a container containing just ice at $-1^\circ \rm C$. When you heat it, the energy goes into kinetic motion of the molecules, and its temperature increases. Similarly, if the container is filled with liquid water at $1^\circ \rm C$ its temperature will increase for the same reason.
But now imagine the container is filled with 90% ice and 10% water at $0^\circ \rm C$. If you heat the water part up, it's temperature will temporarily increase a little. But now the water is hotter than the ice, so heat will be transferred from the water to the ice. When the ice is heated above $0^\circ \rm C$ it melts, and this uses up some energy, cooling the water. This will continue until the ice and the water are the same temperature again, so you'll end up back at $0^\circ \rm C$, but with a higher proportion of liquid water and less ice.
This is why, if you heat a mixture of the two phases slowly enough, all the energy will go into melting the solid rather than increasing the temperature. It continues until all the solid has melted, which is when the temperature starts increasing again. The same thing happens in reverse if you decrease the temperature.
Roughly speaking, this additional energy will be at first step kinetic, it will increase molecule bouncing around there equilibrium points, until it will be enough to take them out of that equilibrium, and then this energy spent to make the phase transition.
More precisely your confusion is because of the fact that the statement you mentioned "temperature will not change.." is right in quasi-statistical equilibrium processes, that is it's right when looking on the process from macro point of view and on a long term, but locally on the particle level and for a small period of time situation is seems different because you didn't reached yet the equilibrium state of your system yet.