This was a question that had puzzled scientists for thousands of
years. In the 1800s, astronomers thought it was gravity: the slow
contraction of the Sun's mass to a smaller volume. This is indeed
a source of energy in massive bodies (like Jupiter!), but such a
source in the Sun would
only last a few million years. Geologists in the early 1900s began
to claim the Earth was billions of years old, something that posed
an embarrassing situation for astronomers to explain!
Luckily, one hundred years ago physicists
were beginning to understand the Four Forces of Nature:
1. Gravity -
This force acts between all mass in the universe
and it has infinite range.
2. Electromagnetic -
This acts between electrically charged
particles. Electricity, magnetism, and light
are all produced by this force and it also
has infinite range.
3. The Strong Force -
This force binds neutrons and protons
together in the cores of atoms and is a short
range force.
4. The Weak Force -
This causes Beta decay (the conversion of
a neutron to a proton, an electron and an anti-neutrino)
and various particles are formed by strong interactions
but decay via weak interactions. Like the strong
force, the weak force is also short range.
The Sun like all stars makes its energy via nuclear fusion reactions which makes use of the
Strong Force.