Formation of Ice:
When the temperature of liquid is decreased the motions of liquid molecules slows down. And the density of water starts to increase. This behavior is shown by almost all liquids.
In case of water, with decrease in temperature the density starts increasing but up to 4-6 °C. Below this temperature the ice formation starts take place and the density again decreases.
This decrease in density is due to the shape of Ice crystal. The Hydrogen bond interactions between the water molecules at freezing point gets rigid and occupies a specific space making geometry of oxygen atom Tetrahedral and overall Hexagonal for one crystal. This orientation creates a space between the molecules and increases the volume up to 9%. That is why Ice floats on Water.