As pure substances (atoms or molecules) go from gas to liquid to solid, they undergo changes of state, or phase changes.
Do you know why a substance undergoes a phase change?
It takes a change in pressure, or a change in temperature, to make a phase change happen.
We will now consider phase change as a result of change in temperature; you need to have heat energy flow (H) into a substance in order to cause a phase change, and heat energy is composed of kinetic energy and potential energy.
The average kinetic energy of a substance is proportional to its temperature, but a potential energy input has very little effect, if any, on the substance's temperature.