This is one of the most important, and interesting, problems in astronomy. Basically, it is very difficult to pin down an individual star's age. It has taken astronomers most of this century to piece together the life cycles of stars, simply because we cannot live long enough to follow a single star through its life cycle. Except in a few rare cases, most stars have looked the same as they do now since before humans began looking up at the sky.
Yet stars vary remarkably in their physical characteristics. Some are a million times more luminous than the Sun; others are a million times less luminous. Some, such as the Pistol star, are as big as the Earth's orbit; others are as small as a city.
Do stars look different from one another because of they have different ages, masses, compositions, distances or some other fundamental characteristic? The key is to find a group of stars that has to be the same age and composition. Hundreds of star clusters are in fact known. (A nearby cluster, the Pleiades is visible to the naked eye.)
Because it is highly unlikely that the stars in a cluster got together by accident, they must have been born at the same time. If they formed at the same time, then they must have the same composition too, because they condensed from a single cloud of interstellar gas and dust. Finally, because we see the group of stars together in the sky, they must all be about the same distance from us as well. That means the brighter stars in a cluster really are more luminous. So within a cluster, any differences we see between its stars must be due to the only thing left: mass.
Shortly after the turn of this century, Enjar Hertzsprung and Henry Norris Russell found that in a diagram of stars' luminosity versus temperature, you get a nearly straight line. That means stars can have only certain combinations of these two properties. The most luminous stars are hottest, and the least luminous stars are coolest. Such a diagram is called an H-R diagram, and the place most stars fall is called the main sequence.
For every general rule there are exceptions, however. A few percent of the stars in such a diagram are Red Giants, which prove to be both very luminous and cool. Another ten percent or so prove to be pretty hot, and yet very dim; these are called White Dwarfs.
When we compare H-R diagrams for many different clusters, we find that those clusters which have many hot bright stars usually have some visible gas, suggesting that star formation may not be over. This type of cluster seldom has any Red Giants or White Dwarfs. In fact, the trend is that the fewer hot and bright stars a cluster has, the more Red Giants and White Dwarfs it has. The most likely cause of these differences is that different clusters have different ages--so we deduce that Red Giants and White Dwarfs are what stars become as they grow older.
A detailed comparison suggests that stars begin their lives on the main sequence and stay there for very long times. They then become Red Giants, a phase which lasts only about 10 percent as long--based on the fraction of stars like this we see in clusters. Finally, most stars seem to become White Dwarfs and stay that way. Thus a cluster accumulates White Dwarfs over billions of years.
So much for the sequence of stellar youth, middle age and death. But how can we tell a particular star's age? That's much harder. Mostly, we have to depend upon physical laws and "build" a stellar model of a particular mass and composition that agrees with the luminosity and temperature of stars we do see. If we don't choose right, the model won't "work." That is, it tells us that such a star isn't stable and therefore doesn't exist.
Only the fusion of hydrogen into helium can provide enough energy to power most stars. In our models we find that choosing how much helium (and the trace amount of heavier elements) almost completely determines a star's temperature and luminosity. The models that fit Red Giant's characteristics suggest that they are mostly helium inside and so they must be old; the hydrogen in their cores has already been turned into helium. The models that fit White Dwarfs low luminosity and temperatures best suggest that no energy generation is taking place and that their cores are made of elements heavier than helium.
So, in the end, we can make an educated guess about the age of a star by the core composition of the model that fits best--and the time it would take the hydrogen to turn into the helium. This takes billions of years for main sequences stars like the Sun. To turn helium into carbon and heavier elements takes much less time (only a few hundred million to a billion years), and it is these models that fit the observed characteristics of Red Giant stars best. So we conclude that Red Giants are old stars, which don't have much lifetime left.
For hydrogen-burning stars on the main sequence, such as the Sun, there is another way to narrow down an age. Just as the Sun has an 11 year sunspot cycle, stars also have activity cycles; they have many "star-spots" sometimes, and a few at other times. These cycles are detectable by looking for the spectral features that active surface regions emit, such as the emission lines of the common element calcium. Models suggest that the activity of a star, and the brightness of these spectral features, declines as a star ages. Hence, one way of determining a main sequence star's age is to measure how bright these activity-sensitive spectral features are.
How about the age of a White Dwarf star? These stars aren't making their own energy anymore, and only shine because they are still hot from their hydrogen and helium burning phases. They are so small and so hot that it takes billions of years for them to cool to the temperature of interstellar space, which is just a few degrees above absolute zero.
Think of a cup of coffee. When first poured, it is very hot, but as time goes on the temperature falls. If you know how fast a cup of coffee cools, you can measure its present temperature and determine how long it has been since it was poured. The color of a White Dwarf is easy to measure, and it directly tells us its temperature. The redder it is, the cooler it is--therefore the older it is.
Curiously, we find no White Dwarfs cooler than about 4,000 Kelvins. It takes a White Dwarf about 10 billion years to cool to this temperature. So we conclude that even the first generation of stars in our galaxy, whose remnants are now White Dwarfs, have not had a chance to cool below 4,000 Kelvins. By that reckoning, the galaxy, and hence the whole universe, must be at least 10 billion years old.