When Temperature decreases the atmos energy gets down and it reduces the vibration of atoms.
Now, at T = zero degrees Celcius the vibration of atoms turns too low then the atoms start making fixed hydrogen bonding with cave-like structures.
This is Ice formation.