Most liquids contract when cooled, getting denser until they freeze into a solid. Their moving molecules lose kinetic energy, slowing them down, so they become prone to the attractive forces of nearby molecules drawing them closer together. Water exhibits this normal behavior down to 4 degrees Celsius (or 39.2 degrees Fahrenheit) where its density reaches a peak, but cooling actually sees it start to expand again. From 4°C, whether you cool or heat it, water expands.
This anomalous behavior occurs because as water molecules come closer together with cooling, they are increasingly inclined to form hydrogen bonds between the oxygen atom of one molecule and the hydrogen atom of a neighboring molecule. This starts to form structured hydrogen-bonded clusters of water molecules which actually begins to increase the distance between them, reversing the increasing density trend observed up to that point. Further cooling to freezing ultimately forms an orderly crystalline lattice of solid ice which is actually less dense than its liquid water state.
4°C is the point above which the normal effects of thermal kinetic expansion prevail over water’s tendency to form hydrogen bonds.