Stars which have between 80% and eight times the Sun's mass will spend most of their lives burning hydrogen into helium. When this stops, the core begins to contract. This raises the internal temperature of the star causing it to expand enormously: it becomes a red giant.
During this phase, strong stellar winds shed the outer layers of the star. These layers create colourful planetary nebulae expanding from the star, and this material later gets recycled for future generations of stars. The remaining core of the star becomes a faint glowing white dwarf. After trillions of years they cool down and no longer glow: they are now black dwarfs.
This graphic will form part of the "The Living Universe" exhibition, to be displayed at the ESO Supernova.