how are ions held together in a compound?
Ions in ionic compounds are primarily held together by the electrostatic forces between the charge distribution of these bodies, and in particular the ionic bond resulting from the long-ranged Coulomb attraction between the net negative charge of the anions and net positive charge of the cations.