A covalent bond consists of a pair of electrons shared between two atoms. It is represented by a line in a displayed formula. The bonding comes from the attraction of each atom's nucleus towards the shared pair of electrons.
A double bond (for example in O2) consists of 2 shared electron pairs and is represented by 2 lines between the atoms.
A triple bond (for example in N2) consists of 3 shared electron pairs and is represented by 3 lines between the atoms.
You can work out how many covalent bonds an atom will make from its position in the periodic table. Group 7 (halogen) and hydrogen atoms form 1 covalent bond in total. Group 6 non-metal atoms form 2 covalent bonds (either 2 single bonds or 1 double bond). Group 5 non-metals form 3 covalent bonds (3 single bonds, 1 double + 1 single bond, or 1 triple bond) and group 4 non-metals form 4 covalent bonds (4 single bonds, 1 double and 2 single bonds, 2 double bonds, or 1 triple and 1 single bond). Metals rarely form covalent bonds: they usually bond ionically.