The temperature remains constant as the heat is being used to break down the intermolecular forces of attraction in the substance. The forces hold it and its structure in a particular phase. The heat energy given to the substance causes the forces to break and the substance to change phase. All of the heat is used up to break the attractive forces, so the temperature does not increase until all of the substance has changed phase.