The compounds formed by the transfer of valence electrons from one atom to another are called Ionic or Electrovalent compounds.
These compounds form when a metallic atom with 1, 2, or 3 valence electrons transfers electrons to a non-metallic atom with 5, 6, or 7 valence electrons. This transfer allows both atoms to achieve the electronic configuration of the nearest inert gas.
The metal atom, after losing electrons, becomes a positively charged ion called a ‘cation’. The non-metal atom, after gaining electrons, becomes a negatively charged ion called an ‘anion’. The electrostatic attraction between the oppositely charged cations and anions forms an ionic or electrovalent bond.