When a liquid is cooled, the particles lose energy to the surroundings and move slower.
The attractive forces between particles become stronger as they come closer together.
Eventually, the forces are strong enough
to form bonds between the particles
and hold them in tight positions.
Heat is released when strong bonds are packed between the particles.