Change in Physical State. Heat also affects how molecules interact with each other. Heating a solid above a certain temperature will cause it to melt to form a liquid; further heating causes this liquid to boil to form a vapor.
When water is in its solid state (ice) , the water molecules are packed close together preventing it from changing shape. Ice has a very regular pattern with the molecules rigidly apart from one another connected by the hydrogen bonds that form a crystalline lattice.
So what happens is the water that is just slightly above the freezing point rises to the top so the freezing process starts there. This is the same reason why ice is at the top of a lake in the winter and not at the bottom.