Comparison of Solids and liquids density
Liquids have a lower density than that of solids.
Water is also a liquid so it should also have less density than that of solid that is ice. Though ice is solid, it has a cage-like structure hence there are a large number of empty spaces between its particles.
These spaces are larger as compared to the spaces present between the particles of water. Thus for a given mass of water, the volume of ice is greater than that of water.
Hence, the density of ice is less than that of water. A substance with lower density than water can float on water. Therefore, ice floats on water.
Explanation
When water freezes into its solid form, the molecules are able to form more stable hydrogen bonds locking them into positions. As the molecules are not moving, they are not able to form as many hydrogen bonds with other water molecules. This leads to ice water molecules not being as close together as in the case of liquid water, thus reducing its density.