An ionic bond is an electrostatic interaction between a cation(positive) and an anion(negative). These bonds are formed when a metal forms a compound with a non-metal.
Metals lose electrons and become cations.
Non-metals gain electrons and become anions.