The chemical bond formed due to an electrostatic force of attraction between the oppositely charged cation and the anion is called an ionic bond or an electrovalent bond.
Sodium chloride is a compound formed from the ionic bonding of sodium and chloride ions.
The sodium atom loses an electron, forming Sodium ion(Na+), and the chlorine atom gains an electron to form Chloride ion (Cl−). These ions attract each other to form sodium chloride (NaCl).