Stars spend most of their lives fusing hydrogen nuclei in their core to create helium. When the hydrogen in the centre of a star runs out, the star begins to use hydrogen further out from its core. This causes the outer layers of the star to expand and cool. Over time, the star grows to more than 400 times its original size. As the star cools, it changes colour and glows redder. The star is now a red giant.
Red giants can swallow up planets as they expand. The Sun will reach its red giant stage in about 5,000 million years time. During this phase, it will probably engulf the inner planets of our Solar System which could include the Earth. But don't worry! This won't happen for a very long time.
As the outer layers of the star expand, gravity causes its core to shrink and contract. The temperature and pressure in the centre increases until nuclear fusion can start again. Now the core is fusing helium, rather than hydrogen.
The star, now powered by helium, starts to shrink, get hotter and turn blue. However, the helium quickly runs out, so this stage only lasts for about a million years. When the helium runs out, the core shrinks again. This time the star begins to use helium further out from its core. At the same time, it may start fusing hydrogen in a shell around the helium fusion! The outer layers of the star expand, cool and turn red again. It has entered its second red giant phase.
What happens next depends on the mass of the star. Low-mass, Sun-like stars enter the planetary nebula phase. Stars which contain more than 8 times the mass of the Sun are likely to explode as a supernova.