To explain how ionic bonds form, we will use common table salt, NaCl, as an example. Sodium has an atomic number of 11; hence, sodium has one electron in its outer electron shell. Chlorine, on the other hand, has an atomic number of 17 and has seven electrons in its outer shell. When these two elements react, sodium gives the one electron in its outer shell to chlorine. Sodium now has eight electrons in its outer shell and is stable. However, the result of losing one electron leaves sodium with one more proton than electron, and therefore, it is now an ion with an electrical charge of +1. An ion is an atom that has a net + or – charge. Ions that have a net positive charge are called cations. Chlorine picked up one electron, and in the process, has become an ion with a -1 charge (one more electron than proton). Ions that have a net negative charge are called anions (think of the term anion as an acronym standing for a negative ion). The opposite charges on these ions create an attraction that will hold them together. We refer to this attraction as an ionic bond. The figure below shows the formation of sodium and chloride ions. By changing the electron configurations of these two elements, their chemical properties have been drastically changed. In terms of strength, this bond is incredibly strong unless placed in water. Biological life requires NaCl (Na+ and Cl-) for proper functions, but both sodium and chlorine with different electron configurations can be lethal. Chlorine gas, Cl2, is a deadly poison, and elemental sodium (no charge) is a metal that ignites when placed in water. This emphasizes the significance of the statement above that the chemical properties of an element are determined by its electron configuration.
It is also important to note that ionic bonds do not form distinct one-to-one attractions between ions, so technically, ionic bonds do not form molecules. Instead, they form crystalline structures in which each anion is attracted to all of the cations near it, and each cation is attracted to all of the anions near it. Even so, you may still read or hear NaCl being referred to as a molecule/compound.
NaCl Crystal Ionic Bonds: Image created by BYU-I student Hannah Crowder Fall 2013
In the image above, the upper left portion represents the formation of an ionic bond. Sodium gives up one electron and becomes a positively charged sodium ion. In the process, its outer electron shell now has eight electrons. Chlorine gains one electron and becomes a negatively charged chloride ion with eight electrons in its outer shell. Upper Right—the negatively charged chloride ions are attracted to the positively charged sodium ions, forming an ionic bond. Bottom—Sodium Chloride crystal. Each sodium ion (purple) is attracted by all of the chloride ions (green) that surround it, and each chloride ion is attracted by all of the sodium ions that surround it.