Final answer:
Ionic bonding occurs when oppositely charged ions attract each other due to the transfer of electrons between metallic and nonmetallic atoms. Covalent bonding occurs when atoms share a pair of electrons.
Step-by-step explanation:
Ionic bonding results from the electrostatic attraction of oppositely charged ions that are typically produced by the transfer of electrons between metallic and nonmetallic atoms. A different type of bonding results from the mutual attraction of atoms for a "shared" pair of electrons. Such bonds are called covalent bonds. Covalent bonds are formed between two atoms when both have similar tendencies to attract electrons to themselves (i.e., when both atoms have identical or fairly similar ionization energies and electron affinities). For example, two hydrogen atoms bond covalently to form an H₂ molecule; each hydrogen atom in the H₂ molecule has two electrons stabilizing it, giving each atom the same number of valence electrons as the noble gas He.