Isotopes are atoms of the same element that have different numbers of neutrons, while ions are atoms or groups of atoms that have gained or lost electrons, giving them a positive or negative charge. Ions are formed by gaining or losing electrons, not protons. Cations are positively charged ions formed when atoms lose electrons, such as metals, while anions are negatively charged ions formed when nonmetals gain electrons. The periodic table can be used to predict which elements will form cations or anions based on their group.