Ice floats on water because of differences in density.
Definition of Density:
Density basically refers to the ratio between an object's mass and volume. Given the same volume, an object with its matter being tightly packed together is more dense than another object which contains matter that is less tightly packed together.
The principle of density was first discovered by Archimedes, who was inspired by the volume of water that his body displaced when he stepped into his bath. From there, he found that the density of different objects can be measured using the amount of water that each object displaces.
Next, there is the concept of relative density, which measures and compares the density between two objects. For most substances, the pure solid form is relatively denser than the pure liquid form, meaning that the solid form will sink when place into the liquid form.
Property of Water:
Water, however, has a unique property that is different from most substances. Like other substances, liquid water at room temperature becomes more dense as the temperature drops. It then reaches its MAXIMUM density at four degrees centigrade.
However, as the temperature continues dropping from four degrees centigrade towards the freezing point at zero degree centigrade, instead of being compressed further, liquid water instead EXPANDS under standard conditions, and becomes LESS dense. This unique property makes water different from other substances, which continue to become more packed and dense as temperatures drop. Water behaves in this manner due to the special characteristics of the duo-hydrogen bond.
Frozen ice, being relatively less dense than liquid water, is thus able to float on top of water.
Significance of this Property:
Thanks to this special characteristic of water, the earth's marine ecosystem is able to thrive during the winter months and in places that experience permafrost.
Under those circumstances, although the top layer of the water body has been frozen solid, the bottom liquid layer remains denser and warmer. This allows marine life, ranging from planktons to fishes and vegetation, to survive in it.
If ice were more dense than water, it will sink to the bottom of lakes, rivers, ponds and oceans during winter. Eventually, the entire water body will be frozen over, from the bottom upwards. Under this scenario, there will be no room left at all for marine life to continue. Imagine all marine life perishing during winter months, and having no marine life in areas that are permanently frozen!
Following from the above, the principle of ice floating on water is not merely a unique physical phenomenon. It is actually the basis upon which the marine ecosystem survives during the winter months and in places of permafrost.