Final answer:
Anions are formed when nonmetal atoms gain electrons and add them to the valence shell.
Step-by-step explanation:
Anions are formed when nonmetal atoms gain electrons. The electrons are added to the valence shell, which is the outermost shell of an atom. By gaining electrons, the nonmetal atom acquires a negative charge and becomes an anion. Most nonmetals become anions when they form ionic compounds.