Answer:
Ions are formed when an atom gains or loses electrons from its valence shell (Figure below). This process causes an imbalance between the number of positively charged protons and negatively charged electrons, so the overall ion will carry a net positive or negative charge.
hope this helps :)