The electrons in the outermost orbit of an atom are the ones that a chemist is concerned with. These are the electrons that interact with other atoms and are responsible for bonding. Nonmetals like Oxygen react by taking or sharing electrons to form a stable octet configuration. H Notice that Oxygen now has a stable octet of electrons. Hydrogen is also happy with 2 electrons in the 1s shell.
Electrons like to travel in pairs.
You might imagine the two electrons traveling in opposite directions canceling out their electromagnetic fields as they move through space. Anyhow I don't want to get too far off the beaten path. The important thing for you to remember is that electrons like to travel in pairs and also form a stable octet. Notice the Hydrogen atom with one electron . It can not exist very long by itself and readily combines with another hydrogen atom to form a stable hydrogen molecule.