The number of electrons in the outermost shell (called valence electrons) determines what element an atom is. Some atoms have as few as one valence electron, while others have eight or more.
In the periodic table, elements are grouped by number of valence electrons and their atomic number is shown in squares on the table. Across each row of the periodic table, the number of valence electrons increases by one from one element to the next.
Metals in group 1 have a single valence electron, which makes them easier to connect with other elements because they only need to lose one to create a positive ion. However, they are more reactive than the more durable group 2 metals.
The valence shell of sodium has only one electron, so it is very easy for it to give up this electron during a chemical reaction. This causes it to be more reactive than group 2 elements with two valence electrons like calcium.
The valence shell of oxygen contains six electrons, with two in the s orbital and four in the p orbital. This means that oxygen atoms can share two of the valence electrons to form a covalent bond, which is what happens in an O2 molecule. This arrangement is also known as the Lewis electron dot structure.