a slight temporary dipole forms due to the random movement of electrons, this induces a dipole in another molecule, which causes a chain reaction and the molecules to be attracted to each other
As water freezes more hydrogen bonds form, as hydrogen bonds are relatively long this causes water molecules to be further apart and ice is therefore less dense than water