What happens to the temperature of a material when it is undergoing a change of state?
Typically nothing, but read further.
Typical changes of state (i.e. melting, freezing, condensing, boiling, sublimation, deposition) are equilibria of either constant-pressure, constant-temperature, or neither.
Example phase diagram:
(Note that the image has an error.
The change in temperature is
You can also perform a diagonal phase transition if you vary the pressure AND temperature.
Finally, if you land on exactly the boiling/melting point, and you keep the temperature AND pressure constant, a natural phase transition occurs, such as everyday boiling or melting.
In either case, you may find it useful that what we have is the Maxwell Relation
#\mathbf(DeltaG = -SDeltaT + VDeltaP).#
This means for constant-temperature (vertical) phase transitions (e.g. isothermal compression/expansion) in a closed system, we have for the Gibbs' free energy
#DeltaG_"trs" = V_"sys"DeltaP_"sys"#
Or for constant-pressure (horizontal) phase transitions, we have
#DeltaG_"trs" = -S_"sys"DeltaT_"sys"#
Or, for constant-temperature, constant-pressure phase transitions (such as everyday boiling/melting), we have
#DeltaG_"trs" = 0, => DeltaH_"trs" = T_"sys"DeltaS_"trs"#
Or, for a phase transition in which neither is constant (diagonal transition):
#DeltaG_"trs" = -S_"sys"DeltaT_"trs" + V_"sys"DeltaP_"trs"#