The answer is #"electrostatic attraction"#..........And we go to back to a very old fundamental principle of physics to establish this......
#"Coulomb's Law"...# which describes the electrostatic force of attraction or repulsion between point charges.
#F_"electrostatic"=(k_exxq_1*q_2)/(r_12^2)#;
Where #k_e# is some constant, #q_1# and #q_2# are the SIGNED magnitude of the charges, and #r_12# is the distance between the point charges....a negative force is attractive......
Now when the positive and negative ions are arranged in a crystalline lattice certainly there is #"ELECTROSTATIC REPULSION"# between ions of like charges, i.e. between the #Na^+# ions, and between the #Cl^-# ions; but at the same time there is #"ELECTROSTATIC ATTRACTION"# between ions of opposite charge, i.e. between #Na^+# and #Cl^-#. If you sum up all the attractive interactions with all the repulsive interactions across the entire lattice, which can certainly be done quantitatively, a NET ATTRACTIVE FORCE results.
The result? Ionic lattices tend to be crystalline, non-molecular materials with no molecular boundaries, with high melting points, and impossibly high boiling points (i.e. much energy has to be expended to disrupt the ionic lattice). Ionic crystals also tend to be quite brittle, which is another consequence of the ionic bond. Ionic crystals TEND to display some solubility in polar solvents that are capable of solvating individual ions. Water is an excellent solvent in this respect, because of its polarity, its ability to separate unlike charges.
Also see this old answer.