When we decrease the temperature, less heat energy is supplied to the atoms, and so their average kinetic energy decreases. When they enter a phase transition, such as freezing from a liquid to a solid, the temperature is not decreasing or increasing, and stays constant.