Hydrogen can lose or gain an electron. It depends.
Whether Hydrogen loses or gains an electron depends on what it is paired with. In chemistry, we have so-called electronegativity values, which describe an atom's ability to attract electrons along a bond. If Hydrogen is better at attracting this electron, then it will gain this electron. However, hydrogen has with 2,2 a relatively low electronegativity, and will, therefore, tend to lose its electron instead