Ionic bonds or electrostatic bonds are formed by the complete transfer of electrons.
Loss of an electron forms cation whereas gain of electrons forms anions.
The atoms are bonded together so as to achieve the noble gas configuration by completing the valence shell electrons either by transferring or by sharing.
The ionic bonds are formed when an element loses its electron and is gained by the other element.
The force involved in the formation of such bonds is called electrostatic force of attraction so they are called electrostatic bonds.
The electrostatic force of attraction of these bonds is much higher and so they are harder in nature.
Example of an ionic compound is Sodium chloride.
They are formed when one electron of Sodium is lost and gained by the Chlorine atom.