As stated earlier, all chemistry except for nuclear reactions involve electron transfers from one atom to another. More specifically, this electron trade takes place at the valence shells of the atoms. In general chemistry, we learn about two major types of chemical bonds, namely ionic and covalent.
Ionic bonding is more likely to take place between elements of highly different electronegativities, especially between metals and nonmetals. We can use Lewis formulas to indicate the manner of the electron transfer in a highly simplified fashion. The dots around the atomic symbol represent the electrons in the valence shell of each element. In the classic example of the reaction between sodium and chlorine, the only electron in the valence shell of sodium is completely transferred to the valence shell of chlorine. Sodium then forms a positive ion and chlorine a negative ion. The electrostatic attraction between oppositely charged ions forms the basis of the ionic bond and is the force that keeps the atoms together.
Covalent bonding is more likely to take place between elements of similar electronegativities, especially between nonmetals. In the reaction between two hydrogen atoms, for instance, the electron transfer is never complete. Instead, the two atoms share the electrons, which in this case spend equal amounts of time around both nuclei. There is no formation of full positive or negative charges and therefore there is no electrostatic attraction. The force that keeps the atoms together is the fulfillment of the octet rule, which will be discussed shortly.