Hydrogen atoms in compounds such as h2 and H2o are joined to the molecules with covalent bonds. This is where electrons are shared between the atoms in order to fill there valence shells.
As we mentioned before, hydrogen can only form one covalent bond because its 1s electron orbital holds a maximum of two electrons. Hydrogen can form either a polar covalent bond or a non polar covalent ( cause there is no electronegativity difference between the two molecules).
Water contain polar covalent bonds because the oxygen has a grater electronegativity than the hydrogen atom.