

Water has a greater entropy than ice and so entropy favours melting. But ice has a lower energy than water and so energy favours freezing. Freezing is an exothermic process; energy is lost from the water and dissipated to the surroundings. Therefore, as the surroundings get hotter, they are gaining more energy and thus the entropy of the surroundings is increasing. The entropy of the surroundings increases by an amount equal to the heat energy they gain divided by the temperature at which it happens.
