Because of opposite charges, cation and anion attract each other through electrostatic force of attraction and form ionic bond.
Sodium Fluoride (NaF)
Now I will form one example of an ionic bond, the Sodium Fluoride with chemical formula NaF.
It is a simple ionic compound, made of the sodium (Na+) cation and fluoride (F-) anion. Sodium is a part of the alkaline family while fluoride is from the halogen family.
Sodium fluoride is found as an odorless, crystalline solid that is white to greenish in color, depending on its purity. Its molar mass is 41.99 g/mol,density is 2.56 g/mL, melting point is 993 °C, and boiling point is 1,704 °C.
It is highly soluble in water and readily dissociates into the sodium and fluoride ions in solution. It is noncombustible and corrosive to aluminum metal. It is stable under normal conditions, but when heated to high temperatures, it decomposes with the release of toxic and corrosive fumes of hydrogen fluoride (HF).
The electron configuration for Fluorine is 1s22s22p5 and for Sodium would be 1s22s22p63s1.