A molecule of oxygen contains two atoms. Oxygen never exists freely in nature but rather exists as a diatomic molecule, meaning two oxygen atoms bond together and share electrons. Other diatomic molecules include chlorine and hydrogen.
The only diatomic elements are the non-metals. Diatomic elements consist of two atoms of the same element sharing electrons. Hydrogen, fluorine, chlorine, bromine and iodine are all diatomic elements and cannot be found as single atoms in their elemental form. These elements need only one more electron to fill their outer energy level, so they need to share or find just one more electron. Oxygen, on the other hand, shares two electrons. Because oxygen needs two more electrons to fill its outermost energy level to become stable, it wants to share electrons with others, especially with other atoms of oxygen.