A chemical bond that involves the transfer of electrons from a metal to a nonmetal and thus forms ions and the atoms in the molecule are attracted towards each other through electrostatic force of attraction are said be ionic bond. In short, the bond formed between the two oppositely charged ions.
In salt, the compound formed between sodium and chlorine is sodium chloride having molecular formula [tex]NaCl[/tex] where sodium is a metal and chlorine is the non-metal. The formation of the compound takes place by transfer of an electron from sodium thus forming a cation of formula [tex]Na^{+}[/tex] to chlorine which gains electron and thus results in an anion formation having formula [tex]Cl^{-}[/tex]. The force of attraction between these oppositely charged ions that helds them together and results in formation of [tex]NaCl[/tex] compound is electrostatic force of attraction.
Hence in salt, the nature of bond between sodium and chlorine is ionic.