Death of a star.
A star, in order to burn hot enough to fuse hydrogen, must have a mass more than 80 times that of Jupiter. Our own sun has a mass about 1047 times that of Jupiter’s.
The fusion of hydrogen atoms into helium gives a star its fuel for radiation. Once a star burns up all its hydrogen fuel, the equilibrium of the star’s convection currents stops flowing and the radiation output ceases to exist. As a result, the star begins collapsing in on itself due to its extreme gravitational force. However, this is just the first sign of a dying star.
To counter its contracting core, the energy created by the collapse begins to heat up the local stellar atmosphere where hydrogen is still present. Eventually it heats up enough of the hydrogen in its vicinity to create more fusion, and this causes the star to begin swelling in size in direct relation to how much hydrogen and other material can be attained, even though the core itself is shrinking.
Because of the degradation of heat and energy, the surface of the star becomes much cooler, and takes on a reddish hue. Thus a red giant is born. Our sun is not expected to enter this stage for at least another 5 billion years.
The fusion of hydrogen might continue in the atmosphere of the red giant star, but the core of the star becomes even hotter. Once temperatures there reach 100,000,000 degrees Kelvin, the fusion of helium occurs. The fusion of helium creates carbon and oxygen.
While it may get hot enough to fuse helium, it is extremely atypical that the core temperature of a red giant star will ever get hot enough to fuse oxygen or carbon.
Once all the helium is used up, the production of energy stops. Everything that is not oxygen and carbon gets expelled into space, and the core continues to shrink under the weight of its own gravity.
Through this process, a red giant slowly becomes a white dwarf, and a white dwarf eventually becomes a dark red that is undetectable in the visible spectrum, much like a light going out.