Atom, the omnipresent component that builds up all the stuff the universe is made of, has its identity tied to the tiny, sub-atomic particle- the proton(s). The proton number decides the type of atom; however, the atom’s reactivity is determined by an outer-nuclear component- the electrons.
In nuclear reactions, the proton number can change so that an atom's identity also changes. However, only the electron count changes in organic chemical reactions without affecting an atom's identity.
The number of protons in the nucleus is always balanced by the number of electrons in the outer nuclear region so that an atom is electrically neutral.
Ions are formed when an atom loses or gains electrons to attain greater stability and to form ionic bonds. If an atom gains an electron, there is an excess negative charge in the outer nuclear region that is greater than the number of protons in the nucleus. Such an atom is called an anion, and the excess charge is indicated with a negative sign in the superscript. For example, Cl-.
On losing an electron, the balance between the electron and proton again shifts so that there is an excess of positively charged protons. This excess is indicated using a positive sign in the superscript next to the number of electrons lost (or by how many the proton number is excess). Such a positively charged atom is called a cation. For example, Na+.
Now, ions can be monoatomic- made of one type of atom- like Na+ or Cl-. Or it can be polyatomic, where a group of atoms are held using covalent bonds, and one of the atoms loses (or gains) covalent bond electrons to become charged. For example- CO32-, NH4+.
(Such a bond cleavage is called a heterolytic cleavage. There is another type of bond breaking, which is impartial, known as homolytic cleavage. If heterolytic cleavage generates ionic species, homolytic generates radical species (read their comparison). Also, by calculating formal charges, there is a way to know which atom that is a part of the polyatomic ion is contributing to the maximum charge.)
In organic chemistry, the most popular carbon-containing ions are carbocation and carbanion. These ions are less stable and always exist as transient species. These are generated in reactions as intermediates, so instead of a single-step reaction, the reaction proceeds in multiple steps.
(In organic chemistry, there are three main types of reactive intermediates - carbocation, carbanion, and free radicals.).
If you're still unsure whether an ion produced by electron loss is still an atom, consider if an orange without its peel is still an orange.
An orange’s identity lies in the orange seed😊
Related Reading- Difference Between Cation and Anion