Covalent bonding
From Wikiversity
When two atoms are in need of extra electrons to fill their outer valence electron shell, they will often share an electron. The most common example that most people are familiar with is water. The oxygen in water forms a covalent bond with the hydrogen, thus filling the hydrogen's outer shell with two electrons (this is because the outer shell of Hydrogen has a maximum capacity of two electrons). While an oxygen atom, originally having six outer electrons, now has seven valence electrons, it requires another in order to fill the shell, and so it bonds with another hydrogen to form H2O.
Covalent bonding does not produce electrons, it simply pairs them so that each atom has one more valence electron than before the bond.
Covalent bonding occurs between atoms with similar electronegativity, and thus most often occurs between non-metals. However, as there are sometimes uneven distributions of electronegativity, either one of the elements in any given compound may attract the shared electrons closer to it than the other one. Therefore, it will have more of a negative charge than the other (while the other becomes more positive). Though this is not a charge to the extent of ions when they gain/lose electrons, due to the slight charge, covalent compounds can produce ionic properties.