Metallicity is a term used in astronomy to refer to the proportion of matter in a star made of elements other than hydrogen and helium. In astronomical parlance, such elements (lithium, carbon, oxygen) are called metals. The quantity of metals in a star depends on its size, age, and most importantly, how much of its light elements it has fused into heavy elements for nuclear fuel. For instance, the Sun, a main sequence star with an age of about 4.57 billion years, has a metallicity of approximately 1.6 percent by mass. As the Sun gets older, its metallicity will increase until it becomes a Red Giant star, burns the rest of its fuel, then sits there for the rest of eternity as a glowing husk called a white dwarf.
Thanks to the magic of spectrometers, astronomers can analyze the chemical composition of faraway stars, even some stars in nearby galaxies. Metallicity is one of the primary variables that astronomers have used to classify various stars as white dwarfs, red giants, main sequence stars, and supergiants. The other variable is color.
Because stars operate on nuclear fusion, the source of their energy comes from fusing together light atomic nuclei (hydrogen and helium) into heavier nuclei (carbon). The younger a star is, the more light nuclei it has, and the less its metallicity is. The stars with the least metallicity of all were hypothetical Population III stars, the first stars to form after matter condensed out of the Big Bang. These stars would have had a metallicity as low as 10-8% by mass.
All modern stars have a significant degree of metallicity, which would be a mystery if not for the postulation of the prior existence of Population III stars. As mentioned, they would have been composed almost entirely of light elements. Being very massive and efficient at fusing together light nuclei, these stars would have exploded after less than a million years -- a typical star lifetime is 10 billion years -- producing heavy elements through supernova nucleosynthesis. In the tremendous heat and pressure of a supernova explosion, a percentage of the light elements would have quickly been pressed together into heavy elements.
These primordial supernovae gave rise to Population II stars, which are the most ancient stars observable today. The oldest of these have metallicities on the order of 10-5%, less than 1/10,000th that of the Sun. Some of these stars are about 11 billion years old, not much older than the universe itself, which is estimated at 13.7 billion years of age. Astronomers continue to look for metal-poor stars as a window into the early universe.