The short answer is that because changes (whether gradual shrinking or contraction) in a star's core where fusion is occuring (or perhaps no longer occuring!) must result in changes throughout the rest of the star, including its surface.
A little more information....
So what's happening in the hydrogen fusing core of a main sequence star?
Well, 4 hydrogen nuclei are being fused into a single helium nucleus many times per second (emphasis on many), releasing energy that ends up replacing that energy lost at the surface of star we call star light - luckily, there are a lot of hydrogen nuclei available for fusion....But what impact does that have? There are two that we've discussed.
1) Gas pressure depends upon number density of gas particles exerting the pressure and the temperature of the gas. If every time a helium nucleus is formed, 4 hydrogen nuclei (and additionally 2 electrons) disappear, then gradually the number density of gas particles will drop and unless something happens gas pressure within the core will fall out of equilibrium with gravity.
2) Over substantial fractions of the main sequence life span, the "fuel" hydrogen is being converted to helium within the star's core, and helium doesn't (yet) contribute any energy from fusion to the star. i.e., the fuel tank will eventually run dry. When that occurs, relatively rapid changes will ensue.
So what's a star's core to do?
First things, first - the star's core must deal with the
pressure-gravity
problem. Gravity gets a slight advantage as the number of particles
there drops due to fusion, and very gradually the core shrinks*.
That is, gravity does work on the core, heating it - gravitational
potential energy is converted into thermal energy
of the gas as it shrinks. Another way to think of it is this: the
smaller the core
becomes, the stronger gravity becomes (masses
are
closer together), and so to get back into pressure-gravity equilibrium the
core's
gas pressure
exerted must be even higher than before. With a (slightly) higher temperature
(recall that Pgas is
proportional
to n x T, where n is the number density of gas particles and T is the
temperature), the greater pressure is again able to balance the
stronger gravity. But the process of fusion continually albeit
gradually reduces the number of particles within the core, and so this
very gradual core shrinkage is inevitable.
But wait a minute, higher temperatures in the core mean that more energy is released from hydrogen fusion...Generally speaking, that extra energy generated by the core translates into (1) making the star's envelope larger and cooler and (2) raising the star's surface luminosity (other subtle effects may play a role and can alter the outcome in detail, but we won't pay any attention to these). Why does (1) occur? Because when you dump energy into a normal gas (in this case the star's envelope), the pressure that gas exerts increases. In very small, gradual steps gas pressure in the envelope exceeds gravity, and so the envelope expands very gradually - reacting to the gradual increase in energy dumped into it from the core below. By doing work against gravity, the envelope (and so the surface) ultimately cools to re-establish pressure-gravity balance. But keep in mind that these changes are relatively minor while the star is on the main sequence; much larger changes are in store as its core runs out of hydrogen "fuel".
A general rule of thumb is that as the core becomes smaller and
hotter,
the
envelope becomes larger and cooler (and vice versa!), for reasons just
discussed. And so
generally
speaking, stars evolve from the main sequence over toward the upper
right
quadrant of the H-R diagram, eventually becoming giant or supergiant
stars.
As stars age away from the main sequence, their cores continue to fuse
lighter
elements into heavier ones (releasing energy), first within a
central
core, then in a shell surrounding that central core. The "ashes" of one
fusion
stage become the "fuel" for the next stage, assuming a sufficiently
high
temperature is attained to allow fusion to occur (recall that
heavier elements have more
protons
and so are more repulsive to each other due to the electromagnetic
force). While the central core is
contracting,
because it hasn't yet reached a sufficiently high temperature to begin
the
next stage of fusion, the resulting changes are relatively rapid. But
after
fusion begins again in the central core, the changes are much more
subtle
and over relatively longer spans of time. Each successive stage of
central
core fusion has a shorter duration than the previous one, mainly
because
the net energy released per full reaction becomes less and less as
the heavier
elements are fused.
Here are the major stages of central core fusion, with their major
products,
their "ignition temperatures", and the approximate minimum mass star
that
will go through that stage of fusion:
4H --> He; about 10 million K; 0.08Msun
3He --> Carbon (C), then He + C --> O (oxygen); 100 million K;
0.5Msun
or so
Carbon fusion: Neon, Magnesium; 600 million K or so; about 6Msun
Oxygen fusion: Silicon, Sulfur; 1 billion K or so; 8Msun
Silicon fusion: Iron; 3 billion K; 10Msun
What determines whether or not the ever-heavier elements that are produced in one stage will fuse in next stage? It is a race between density and temperature in a core that becomes ever smaller under the force of gravity. For if gravity can compress the core to become sufficiently hot to fuse that next element, it will do so and that next stage of fusion will occur. But if the core becomes too dense before the "ignition" temperature for that element is reached, another source of pressure will step in and halt the core's contraction. In that event, the core can become no hotter, and so the next stage in fusion cannot occur, signaling the end of the star's life. What is this source of pressure that occurs at very high densities?
Electron Degeneracy Pressure. This exotic form of pressure
generated
by the free electrons will begin to dominate over normal gas pressure
in stellar
interiors when the densities exceed1
10,000 g/cm3 (recall that water has a density of 1 in
these
units). This pressure has nothing to do with the fact that
electrons
have like charges, but rather it becomes important when electrons are
confined
to lie very near to one another and yet are compelled to avoid
one
another (this same property explains why/how electrons that are bound
to atoms
arrange themselves in "orbital" shells). Electron degeneracy pressure
depends on the electron number density (as n5/3), and is
nearly
independent of
the temperature of the gas. Once established, this pressure will
eventually
halt any gravitational contraction2. Why is this
important?
Because if the electrons in a star's core become degenerate before
the "ignition" temperature of the next stage of fusion is reached, that
next
stage of fusion will never begin, and the star will soon die,
ultimately
ejecting its envelope in a planetary nebula with the core
(supported
by electron degeneracy pressure) becoming a white dwarf. It is
also
this pressure that sets in to keep objects less massive than 8% of the
Sun's
mass from ever becoming stars, since their cores will then never become
hot
enough to sustain full hydrogen fusion.
Finally, consider stars with
masses exceeding 10 times the mass of
our
Sun. They are able to fuse elements all the way up through iron, with a
series
of successive shells (or zones) of lighter element fusion surrounding
an iron
core (like layers in an onion). Once an iron core forms, catastrophic
doom
awaits that star - for fusion involving iron removes energy
from the
environment. What happens next can be summed up in this way. The above
fact
combined with the extreme conditions of temperature (billions Kelvin)
and
density ultimately result in a complete gravitational collapse of the
iron
core. For a variety of reasons3, the increasing
temperature
and density actually push pressure further away from its required
equilibrium
with gravity to prevent a collapse. The net result is that in a
fraction of 1
second of time, an iron core about the size of the Earth and a bit over
1
solar mass collapses to a ball of neutrons about the size of Kalamazoo.
The rest of the core (fusing the lighter elements in
successive
shells) also begins falling inward, although the star's envelope
remains totally
oblivious to what's happening inside. Neutron degeneracy pressure4
suddenly halts the collapse of the innermost neutron core, which
then
rebounds a bit like a suddenly released compressed rubber ball, sending
out
a shock wave that plows through the surrounding zones where fusion is
still
occuring. The shock wave compresses and heats these zones, the energy
released
from fusion becomes explosive and the star suddenly explodes as a supernova
- the star's envelope is driven away at thousands of km/s (how
this
happens in detail is an active area of research). At peak luminosity, a
supernova
emits several to 10 billion solar luminosities of light, and then
slowly
fades with time. Ultimately, the luminous and the kinetic energies of
the
exploding star, plus the energy carried away by the zillions of
neutrinos
formed in the explosive fusion reactions is paid by the gravitational
potential
energy released in the collapse of the iron core. What remains of the
collapsed
core is expected to be a neutron star, as long as its mass lies below
2-3
solar masses. Neutron stars are indeed observed in the centers of
violently expanding
supernova gas shells.