The Sun shines by converting hydrogen in its core into helium, and in the process loses
that is converted to energy via Einstein's E=mc2. It has been doing this for about 4.5
billion years, and is expected to do so for 5 billion more years. After that time, its
hydrogen fuel will be depleted. With its internal energy source shut down, gravity will
cause the core to collapse. That collapse will generate enough heat to expand its outer
layers, turning our Sun into a red giant that will expand beyond the Earth's orbit. (So
don't make any plans for the year 5,000,002,000.)
The collapsed core will become a white dwarf, composed of degenerate matter supported by
the inability of two electrons to occupy the same space. A star more massive than our Sun
eventually becomes a neutron star via a similar process. The most massive stars collapse
to form black holes.
Answered by: Paul Walorski, B.A. Physics, Part-time Physics Instructor
'A scientist is happy, not in resting on his attainments but in the steady acquisition of fresh knowledge.'