Within a water molecule, the oxygen atom and the two hydrogen atoms are joined by strong covalent bonds. Between separate molecules there are much weaker attractions, called intermolecular forces.
When water boils, the molecules move far apart from one another, but every molecule stays whole. Boiling overcomes the intermolecular forces and leaves the \mathrm{O{-}H} bonds unbroken.
Turning 1 mol of water at 100 °C into steam takes about 41 kJ, while breaking all the \mathrm{O{-}H} bonds in 1 mol of water vapour would take about 930 kJ. The stronger the intermolecular forces in a substance, the higher its boiling point.
The electrons in an atom or molecule are always moving. At any instant they may be spread a little unevenly, so that one side carries a slight negative charge and the other a slight positive charge.
This temporary dipole pushes away the electrons of a neighbouring molecule and creates a dipole there too, and the two dipoles attract each other. These London dispersion forces act between all molecules, polar or not.
Molecules with more electrons form larger temporary dipoles, so the forces grow with the size of the molecule. Down the halogens, from fluorine, \mathrm{F_2}, with 18 electrons, to iodine, \mathrm{I_2}, with 106, the boiling point rises from -188 °C to 184 °C.
Polar molecules carry permanent partial charges. Neighbouring molecules tend to line up so that the δ+ end of one faces the δ- end of the next, and these charges attract each other.
This dipole-dipole force adds to the dispersion forces. Hydrogen chloride and fluorine have almost the same relative molecular mass, 36.5 and 38.0, yet hydrogen chloride boils at -85 °C and fluorine at -188 °C.
The difference comes from polarity: hydrogen chloride is polar, while fluorine is non-polar. Among molecules of similar size, the more polar ones have stronger intermolecular forces and higher boiling points.
When a hydrogen atom is bonded to fluorine, oxygen or nitrogen, the shared pair is pulled strongly away from it, leaving the hydrogen atom with a large partial positive charge. Because the hydrogen atom is so small, this charge can come very close to other atoms.
Such a hydrogen atom is attracted to a lone pair on a fluorine, oxygen or nitrogen atom in a neighbouring molecule. This attraction is called a hydrogen bond, and it is often drawn as a dashed line.
Hydrogen bonds are much weaker than covalent bonds but stronger than the other intermolecular forces. In liquid water each molecule can form hydrogen bonds with up to four neighbours, two through its hydrogen atoms and two through its lone pairs.
The compounds of hydrogen with the elements of groups 14 to 17 show how much hydrogen bonds matter. In group 14 the boiling point rises steadily from methane, \mathrm{CH_4}, to stannane, \mathrm{SnH_4}, as the molecules get larger.
In groups 15, 16 and 17 the compounds of the period 3 to 5 elements follow the same trend. But ammonia, \mathrm{NH_3}, water, \mathrm{H_2O}, and hydrogen fluoride, \mathrm{HF}, boil far higher than the trend suggests, because their molecules are held together by hydrogen bonds.
Water boils at 100 °C, while hydrogen sulfide, \mathrm{H_2S}, whose molecules are heavier, boils at -60 °C. Without hydrogen bonds, water would be a gas at room temperature.