Ice is less dense than water.
When water freezes it assume a crystal like structure where the different water molecules orient themselves into this structure so that there are fewer of them ( about 13% fewer if memory serves ) in the same volume.
So...,
Density = mass/volume
Less mass in the same volume means less density of ice and that is why it floats on water.