When a liquid cools, the particles have less energy and move around less, the forces between the particles become stronger, until at the melting point the forces between the particles are so strong that they're held in place and the liquid becomes a solid