Understand that anions are negatively charged ions formed when atoms gain electrons.
Recall that elements tend to gain or lose electrons based on their position in the periodic table and their electron configurations.
Recognize that nonmetals typically have higher electronegativities and a greater tendency to gain electrons to achieve a full valence shell, thus forming anions.
Contrast this with alkali metals and transition metals, which usually lose electrons to form cations (positively charged ions).
Note that noble gases are generally inert and do not commonly form ions because they already have a full valence shell.