In general, when a pure substance or mixture goes from liquid to solid, the molecules in it get closer resulting in a higher density.
If this is so why does ice float in water?
Density = Mass/Volume
The density of liquid water is 1.00 - an arbitrary number. If an objects mass remains the same, yet its volume decreases, the object becomes more dense (take squished bread for example). However, when frozen, water (ice) expands. So the volume is greater yet the mass has stayed the same, thus the density is less than 1. And any substance with a density less that 1 will float in water.