Stars are balls of (mostly) Hydrogen gas that are so hot that they glow. The heat from normal stars comes from a fusion reaction in their cores, in which they take 4 Hydrogen nuclei and make one Helium nucleus. The rate at which this fusion reaction takes place depends on the temperature - the hotter the star's core, the faster the reactions take place.
Not all stars are created equal. Stars are formed when a large gas cloud collapses. When the gas is divided up among the protostars, most of the clumps of gas are toward the lower end of possible stellar masses, and only a few are toward the higher end. Some stars are created with masses up to 50 times the mass of the sun, and some are formed with as low as 8% of the mass of the sun. When a cloud of gas collapses to form stars, many more low-mass stars are formed than high-mass stars.
Massive stars have very hot cores. Since the rate of fusion depends goes up with temperature, fusion reactions happen much more quickly in the cores of high-mass stars than in those of low-mass stars. Even though high-mass stars have more fuel (they have more Hydrogen than low-mass stars), they use it up very quickly, and live only a small fraction of the time that a low-mass star can live. For example, a blue star lives only a few million or tens of millions of years, while a red star can live for tens or hundreds of billions of years.
When a group of stars is formed, there are a few high mass stars, more medium mass stars, and many low-mass stars. The high-mass stars are very bright, and their color (blue) dominates the color of the group (it appears blue). As time goes by, the high mass stars use up their fuel and die, leaving medium- and low-mass stars. Even though there are more medium mass than low mass stars, the medium mass stars are brighter, so they contribute most of the light of the group and the group will appear yellow. After more time passes, even these medium mass stars die, leaving behind only cool, red stars, and the group appears red. So the color of a group of stars is an indication of its age - if it's blue, there are hot stars (which don't live very long), so the group must not be very old. If it's red, there are only cool stars, so it must be very old.