The mass per unit volume of a substance is called density (density = mass/volume). As the volume of a substance increases, its density decreases.
Solids and liquids density comparison
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.