In a covalent bond, two atoms share their electrons in order to complete their respective octets. In the case of H2, each hydrogen atom has one valence electron. When two hydrogen atoms come close together, their valence electrons interact and form a covalent bond. The two electrons are shared equally between the two hydrogen atoms, resulting in a nonpolar covalent bond.
An ionic bond is a chemical bond formed by the electrostatic attraction between oppositely charged ions. A polar covalent bond is a covalent bond in which the electrons are not shared equally between the two atoms, resulting in a partial positive charge on one atom and a partial negative charge on the other.