Ice floats in water because it less dense than water thanks to a special kind of chemical bonding known as hydrogen bonding. Typically solids are denser than liquids of the same substance, such as solid lead, but that is not the case with water and ice.
A hydrogen bond is a weak bond that occurs between a pair of unbonded electrons from another atom and a hydrogen atom. Water molecules commonly create hydrogen bonds between one another. When the temperature is warm, the water molecules have lots of energy and they can move past one another as well as well as mix with each another. That changes when the temperature is cooled. In cooler temperatures, the water expels less energy and the hydrogen bonding takes place in earnest. Because of this, the molecules form an ordered crystal through the hydrogen bonding.
This ordered crystal spaces the various molecules father and father apart. Soon they are farther apart than when they were a liquid, which makes ice less dense than water. The less dense object is always the one that floats so ice floats in water. Density is the measure of the relative "heaviness" of an object that has a constant volume. The volume of ice is also greater than the same mass of liquid water.