When water turns to ice, the water molecules lose energy and slow down, causing them to form a rigid, crystalline structure. As the temperature of the water drops below 0 degrees Celsius (32 degrees Fahrenheit), the water molecules lose enough energy to form hydrogen bonds with one another, creating a lattice-like structure.
During the freezing process, the water molecules align themselves in a specific pattern, forming a crystal structure. The oxygen atoms of the water molecules form the corners of the cube-shaped crystals, while the hydrogen atoms bond to the oxygen atoms, forming the edges of the crystals. As more water molecules join the crystal structure, the crystals grow larger.
As the temperature drops further, the ice crystals grow larger and more ordered, resulting in less randomness, and more of a uniform structure. This leads to the ice becoming more dense, and sinking in liquid water. This is the reason why ice cubes float in a glass of water.
This process is known as freezing and it's exothermic, meaning it releases heat, which is why ice feels cold to the touch. In addition to freezing, the structure of ice also undergoes changes when it's exposed to different temperatures and pressures.