Hydrogen.
When they run out of hydrogen fuels in its cores, fusion stops. The collapse of the core causes the temperature to increase in it and around it. Eventually the heat of collapse is enough for the shell of hydrogen are the core to fuse and it turns into a red star.