Heat and Phase Change
Following the logic discussed on the temperature and Phase Change page, it is reasonable to expect that there is a temperature at which these transitions occur. For example, we know that water has a freezing point of 0oC. The melting point of ice is also 0oC. This means that the temperature at which the attractions between water molecules are just barely able to lock the molecules in place is an infinitessimal amount colder than zero. Likewise if the temperature is any tiny amount above zero, the molecules are moving too fast to be locked in place as a solid, making it a liquid. The question then, is if water is at 0oC, will water be melting or freezing. The answer depends on heat.
When particles pull apart (when a solid becomes a liquid or when a liquid becomes a gas) they end up with potential energy. In order to achieve this, energy must be added from somewhere.
When particles come together (either when a gas becomes a liquid or when a liquid becomes a solid) they lose potential energy. When these phase changes occur, energy is given off.
Thus, whether water freezes or melts at 0oC depends on whether heat is being added or taken away.