Ionic bond-When a nonmetallic element reacts with a metallic element, electrons are transferred from the atoms of the metal to the atoms of the nonmetal, forming positive ions (cations) and negative ions (anions), respectively. Cations and anions are held together by the attractive forces among the oppositely charged ions. Covalent bond-the nonmetallic atoms share pairs of valence electrons in order to fill up their outer electron shell and gain stability. They can share one, two or even three pairs of electrons and atoms do not usually share the electrons equally. Covalent compounds form molecules.