For example, sodium chloride (NaCl) is an ionic compound formed by the transfer of one electron from sodium atom to a chlorine atom. This results in the formation of Na+ and Cl- ions, which are held together by the electrostatic forces between them.
Ionic bonds are typically formed between metals and non-metals. The metal atoms lose electrons to become cations, while the non-metal atoms gain electrons to become anions. The strength of an ionic bond depends on the charges of the ions and the distance between them.