When two hydrogen atoms get close enough, the electron from each atom feels an attraction from the proton in the other atom's nucleus. This attraction pulls the atoms together. The electrons end up ...
The picture shows a close-up of one carbon atom. A hydrogen atom has one proton as the nucleus and one electron in the region outside the nucleus. The electron and proton are attracted to each other.