How atoms interact with other atoms is largely dependant on the number of electrons on its outermost layer. The electrons on this layer are called valence electrons.
As you might know, atoms have their electrons arranged in layers/shells, starting at k, l m, n etc. Each layer has a maximum number of electrons it can accommodate, with the outermost one being the valence shell. The first layer (k) can accomodate 2 electrons, the second one (l) can accomodate 8, as can the third one (m) etc.
As a rule of thumb, most atoms don't like being alone. These atoms have a valence shell that isn't saturated. This is the case for hydrogen(1), with one free slot in its outter shell.
However, atoms like helium are a bit different. They are inert, and don't need to bond with other atoms. This is because their valence shell is saturated. In this case, helium saturated the k shell with 2 electrons. Helium in this form will not form bonds.
However, hydrogen is still out there looking for buddies. Hydrogen will bind with any other atom with a free electron. Being extremely common, it's likely that said atom will be another hydrogen.
However, another common example would be for 2 hydrogens to bond with one oxygen, forming h2O (oxygen can form 2 bonds)
Conclusion : helium is inert and will not interact with other atoms. Hydrogen is not, and thus needs to bond with other atoms.