Molecules. H2, N2, O2 are called di-atomic because they contain two atoms of the same element. Compounds are molecules that include more than one type of atoms.
when two non metals bond it is a covalent bond so hydrogen and oxygen to form water is covalent, methane which is four hydrogens to one carbon is a covalent bond.
When atoms bond together they make molecules or compounds, depending on if the atom bonds with another atom of the same species or a different chemical