Stars are mainly made of hydrogen and helium gas. In the centre of a star, the temperature and pressure are so high that four protons can fuse to form helium, in a series of steps. This process releases huge amounts of energy and makes the stars shine brightly.
As stars age, what happens inside them changes. At the beginning of their life, stars burn hydrogen. But after millions of years, the supply of hydrogen begins to run out. Over time, the star will therefore shrink, getting hotter and producing increasingly heavy elements - like carbon, nitrogen and oxygen. These elements are some of the fundamental ingredients for life.