The density of water is greater than that of ice at the freezing temperature. As the temperature of water is raised, the density rises to a maximum value near 4 °C, and falls after that.
The change in density is attributed to the collapse of the open structure found in ice. Ice involves the formation of an extended hydrogen bonding system which requires appropriate positioning of water molecules and, therefore, has considerable open space. When heated, this structure collapses, and the density rises. The structure continues to collapse as the temperature is increased. In general, when condensed matter is heated, its density decreases -- the matter expands. The density found for water is thought to arise from a combination of collapsing structure and expansion due to thermal motions.