In order to answer this question it is important to remember that an atom has energy in two forms: kinetic (energy that allows the atom to move) and potential (energy that is stored in the bonds between each atom). One also needs to recall that the temperature of an object varies with the average kinetic energy of the atoms that make up said object. When an object is undergoing a change of phase, for example from a solid to a liquid, the energy being input into the object, such as heat from a flame, is being used not to increase the kinetic energy of the atoms but instead to overcome the bonds between them. This means that the average kinetic energy of the atoms that make up the object does that change and so the temperature of the object does not change.