Question: how are they formed ions?
Answer: Ions are formed when atoms lose or gain electrons in order to fulfill the octet rule and have full outer valence electron shells. When they lose electrons, they become positively charged and are named cations. When they gain electrons, they are negatively charged and are named anions.