In ionic bonds one atom is positively charged (the atom that gives its electrons), and the other atom is negatively charged (the atom that receives the electrons); therefore, it is the opposite charge of the ions that attracts them to one another and holds them together. This electrostatic force is quite strong, which accounts for why ionic bonds are difficult to break apart. Metals bonded to nonmetals compose the vast majority of ionic bonds where the metal is the cation (giver of electrons) and the nonmetal is the anion (taker of electrons). Ionic bonds form only under exothermic conditions.
The atoms are held together by opposite charges.