Heating curves and phase changes

Heat added to a substance either raises its temperature, $q = mc\,\Delta T$, or changes its phase at constant temperature, $q = n\,\Delta H_{fus}$ or $n\,\Delta H_{vap}$, because during melting or boiling the energy goes into separating particles, not speeding them up.

From General Chemistry.