Changes of state occur at particular temperatures, so the heat associated with the process is given by:
freezing or melting: Q = mLf
where Lf is the latent heat of fusion
Boiling or condensing: Q = mLv
where Lv is the latent heat of vaporization
For water the values are:
Lv = 2256 kJ/kg
Lf = 333 kJ/kg
c = 4.186 kJ/(kg °C)