The core of a red giant or super giant, also known as an old star, is mostly helium, with an outer shell of burning hydrogen.
The helium contracts while the hydrogen expands.
The star grows brighter and much bigger as the hydrogen escapes into space as radiation.
Expansion cools the shell, but contraction heats the core. When the core reaches 100 million°K (180 million°F/100 million°C), the helium turns into carbon through another process of thermonuclear fusion.
Within a few hours, the core’s increasing heat and energy set off a helium flash.
The helium flash, not quite an explosion, sparks yet another string of nuclear reactions, and, for the next few million years, the star moves back and forth, toward and away from, the main sequence.