Elements are materials that consist only of atoms with the same atomic number. The atomic number for an atom is the number of positively charged protons in an atom.
The number of electrons is equal to the number of protons. Electrons orbit the protons. This is an oversimplification of reality, but the reality is that the electron is actually a probability wave function. The mathematics to get the electron right are beyond most people on the planet. Best to think of the electron as zipping around the proton. The drawing below left is an abstract image of a hydrogen atom with its single proton and single electron.
The atomic number is determined by the number of protons. Hydrogen has an atomic number of one. The atomic mass is determined by the number of protons and neutrons. While hydrogen always has one proton in the nucleus, the number of neutrons can vary from none to two. Hydrogen with one neutron is called deuterium and has an atomic of mass of two, hydrogen with two neutrons is called tritium and has an atomic mass of three.
Electrons not only go around the proton, but electrons also spin around their own center. Some spin "clockwise" and some spin "counter-clockwise." Spinning is one of the fundamental movements of the universe. Electrons tend to pair up. Electrons are particles, not thinking beings. If electrons could think, we would say electrons like to be in pairs, one spinning one way and the other spinning the other way. Hence, to continue to anthropomorphize, a single electron is lonely and wants an opposite spin partner. The result is that hydrogen's electron will either try to snatch a partner electron from another element or simply run away to an element in which it can become a pair. Two hydrogen atoms will remain bonded together, sharing their electrons, as this puts two electrons together.
Helium is atomic number two because of the two protons in the nucleus. Along with two protons are two neutrons, thus the atomic mass is four.