A neutral atom has equal numbers of protons and electrons, so the charges cancel. Remove one electron from sodium and the count becomes 11 protons and 10 electrons: one positive charge left over, written Na+. Add one electron to chlorine and it has 17 protons and 18 electrons: Cl−. Electrons are the only particles that move, so the nucleus, and with it the element's identity, stays the same.
Which way an atom goes depends on its valence electrons. Metals with 1, 2 or 3 outer electrons lose them and become positive cations: Na+, Mg2+, Al3+. Nonmetals with 5, 6 or 7 gain enough to reach 8 and become negative anions: N3−, O2−, Cl−. Some ions are groups of atoms carrying one shared charge, such as ammonium, NH4+, and sulfate, SO42−.
An ion is not an isotope. An isotope changes the number of neutrons, so its mass changes and its charge does not; an ion changes the number of electrons, so its charge changes and its mass barely does. A charged particle is also not always an ion of the element its electron count suggests: a particle with 10 electrons and a charge of +1 has 11 protons, so it is sodium, not neon. Always work back to the proton count.
Think of it like this. Picture the charge as a bank balance: each proton is a +1 deposit and each electron a −1 charge on the account, so a neutral atom balances at zero. Remove electrons and the balance goes positive, a cation; add electrons and it goes negative, an anion. The account number, the proton count, never changes.
Core idea. An ion is an atom or group of atoms whose electrons and protons no longer balance. Losing electrons makes it positive and gaining them makes it negative, and the element stays the same because the protons never change.