Some atoms have a strong attraction for electrons, called electronegativity, that allows them to pull electrons away from other atoms to form ions. Atoms that gain electrons become negatively charged anions, while atoms that lose electrons become positively charged cations. Cations and anions are attracted to each other due to their opposite charges and form ionic compounds. Ionic bonds result from the electrostatic attraction between oppositely charged ions.