Bonds form by the attraction of negatively charged electrons and the positive nucleus of atoms. Atoms have a positively charged tiny nucleus which contains almost all the atom's mass, surrounded by shells of negatively charged electrons. Each shell is able to hold only up to a fixed number of electrons when it is said to be full.
Hydrogen has a single positive charge in the nucleus and a single electron. If two hydrogen atoms approach each other, there is an attraction: the positive charge and the negative electron charge attract.
However the first shell, for all atoms, can only contain two electrons so once the two Hydrogen atoms come together the two electrons essentially 'fill' the outer shell of both Hydrogen atoms. The atoms are essentially 'glued' together by the attraction of the two electrons and the two nuclei.