My science teacher is not very good at explaining things, and I need help. He set us homework about changes in temperature, one question "Explain why the temperature of the wax remains constant during solidification". In the lesson, he explained how as a solid is increasing in temperature, when it reaches a certain point (0 degrees Celsius for water) the energy being used to heat the solid stops being used to heat the solid, and instead, is being used to break down the intermolecular bonds to change the solid to a liquid. This is fine, but what I don't understand, and I need to understand for this question, is: when a liquid, in this case molten wax is cooling, it has a loss in thermal energy. So where the fuck is it getting the energy to change state?