Ions are formed as atoms lose or gain electrons to satisfy the octet law and have complete electron shells of the outer valence. They become positively charged as they lose electrons, and are called cations. They are charged negatively when they gain electrons, and are called anions.