In a molecule, the valence electrons of each atom are grouped in pairs. A bonding pair is shared between two atoms and forms a covalent bond; a lone pair belongs to a single atom and takes no part in a bond.
Examples
Example 24.7 (Carbon dioxide)
: valence electrons, 8 pairs. Single bonds use 2 pairs; 6 lone pairs on the oxygens complete them, but carbon then has only 4 electrons. Turning one lone pair of each oxygen into a shared pair gives two double bonds: each atom now has an octet.