During a phase change, a substance receives or gives away heat. However, the temperature stays constant, since the energy is not used to increase the kinetic energy of the constituent molecules of the substance. The heat received (or given away) is used to break up (or form) the bonds between the molecules, in order to change the substance's thermodynamic state/phase.