Between two non-metals, neither atom wants to give electrons away — so they share. A shared pair of electrons is a covalent bond. Share one pair and you have a single bond; two pairs make a double bond; three make a triple bond, which is stronger and shorter still.