Ice floats in water because ice weighs less than water. Since ice weighs less than water, it also has less density, contributing to its ability to float in water.
Density is defined as a measure of the mass of an object with a constant volume. The equation for density is mass divided by volume. As water freezes and turns into ice, the individual water molecules spread out and form into a crystalline solid. This causes the ice cubes to occupy more space than liquid water. Even though the ice occupies more space, it still has less density than water and a smaller mass, causing it to float in water.