Two hydrogen atoms can share each of their single electrons to form a strong attraction called a covalent bond.
Two or more atoms linked by covalent bonds make stable molecules.
Thus a hydrogen gas molecule (H2) has a covalent bond (a pair of shared electrons) between two hydrogen atoms.
A double bond is the sharing of four electrons as seen in an oxygen gas molecule (O2): it has one double bond with two pairs of electrons.