Why there is a change in enthalpy in phase transition?
I'm asking because enthalpy depends only on temperature:
$$\mathrm dH = C_p\,\mathrm dT,$$
and the change in temperature is $\mathrm dT = 0.$
For a single phase, enthalpy is a function of temperature and pressure, and, at constant pressure, $\mathrm dH = C_p\,\mathrm dT.$
However, at a change of phase, enthalpy (per unit mass) undergoes a jump change, even at constant temperature and pressure. If the phase change is from liquid to vapor, for example, this jump change in enthalpy is called the heat of vaporization.