Stars are grouped into stellar populations, depending on the fractions of chemical elements inside the star. In astronomy, all elements except hydrogen and helium are called "metals". Elements like carbon and oxygen are called "metals" in astronomy, even though they are non-metals in chemistry. The "metallicity" of a star is the amount of "metals" in it.