When a solid melts or a liquid boils, the heat supplied is actually used to break the bond forces between the molecules and bring them apart till the body changes its state completely. Thus, the energy is transferred to the molecules as kinetic energy and the temperature of body remains constant in the process.