What Causes Water to Freeze?

Water comes in three states: solid, liquid, and gas. The solid state is ice. What causes water to freeze into this solid state? It’s merely the water molecules slowing down until they’ve practically stopped moving at all.