Ionic bonding occurs when atoms transfer electrons, forming positive and negative ions that bond together. Specifically, metals donate electrons to nonmetals to complete their outer energy levels, with the metal always written first in the compound. The final bonded ionic compound is stable with no overall charge.