Generally, solids are denser than liquids of the same substance. Solid lead, for instance, is denser than liquid lead. Because it is denser, it sinks. This is not the case for water, however. Ice is less dense than water, therefore it floats.
Ice is less dense than water because of a special type of chemical bonding called hydrogen bonding.
A hydrogen bond is a weak bond between a hydrogen atom and an unbonded pair of electrons from another atom. As you can see, water molecules are prime candidates for hydrogen bonding between each other. At warm temperatures, water molecules have a lot of energy and are able to move past and mix with each other despite the attractions between the hydrogen atoms and unbonded electron pairs. As water is cooled down, however, the molecules have less energy and hydrogen bonding takes over. The molecules form a ordered crystal through hydrogen bonding that spaces the molecules farther apart than when they were in a liquid.