The proton-proton chain. This is the principle fusion reaction in the Sun. Mass, in the form of hydrogenatoms, is converted to energy as described by Einstein's formula: E = mc2.
What kind of fire is burning on the Sun? And what keeps it burning steady?
The power generator in the Sun is in its center, buried deeply within it. It is called "the core", with a radius close to one fourth of that of the star (see the figure above). In the core, pressures and temperatures are high enough to force fusion, that is, nuclear reactions whereby some nuclei merge to make others. It is the type of reaction that powers a hydrogen bomb. The most important reaction within the core of the Sun is the process called the "proton-proton cycle."
In the proton-proton chain reaction, hydrogen nuclei are converted to helium nuclei through a number of intermediates. The reactions produce high-energy photons (gamma rays) that move through the "radiative layer" surrounding the core. This layer takes up 60 percent of the radius of the Sun. It takes a million years for energy to get through this layer into the "convective layer", because the photons are constantly intercepted, absorbed and re-emitted. In the core, the helium nuclei make up 62% of the mass (the rest is still hydrogen). The radiative and convective layers have about 72% hydrogen, 26% helium, and 2% heavier elements (by mass). The energy produced by fusion is then transported to the solar surface and emitted as light or ejected as high-energy particles.
By the time the energy reaches the surface of the Sun, things have cooled down to 6000 degrees Kelvin, a temperature that corresponds to the sunlight we see. By now most of the hydrogen is in the atomic state and the density of the gas is low, similar to that of the gas in neon lights. The energy emitted from the hot surface, on average, is near 230 million watts per square meter. (On Earth's surface, we typically get about a millionth of that, to warm us.)
The solar surface showing active regions and magnetic loops. (Courtesy of SOHO/EIT Consortium)
Nuclear fusion, the source of all the energy so generously radiated by the Sun, does two things: it converts hydrogen into helium (or rather, makes helium nuclei from protons) and it converts mass to energy.
The mass-to-energy conversion is described by Einstein's famous equation: E = mc2, or, in words, energy equals mass times the square of the velocity of light. Because the velocity of light is a very large number, this equation says that lots of energy can be gained from using up a modest amount of mass.
The energy created by the fusion processes within the core of the Sun (or any other star) exerts an outward pressure. Unless contained, such pressure would produce an explosion (as happens in the hydrogen bomb, on a much smaller scale). The inward pressure that keeps a star from exploding is the gravitational attraction of the gas mantle surrounding the core (which is most of the volume of the Sun, and is very hot but does not burn itself).
The pressure of the energy generated in the solar core pushes outward and would cause the Sun to expand if it were not exactly balanced by the gravitational pressure of the Sun's outer layers.
The outward pressure from the fusion reactions keeps the stars from collapsing. The inward pressure from gravitation keeps the stars from exploding. If the fusion reactions in the core become too weak, a star can and does collapse. Such collapse can provide new conditions in a core that result in new types of fusion reactions, so that expansion follows. If fusion reactions in the core become too strong, a star can and does explode. Such events can be observed. When a star explodes it shines with extreme brightness for a while; it turns from an unnoticed to a "new" star, a "nova". Stars, like our Sun, where inward pressure and outward pressure is nicely balanced, fluctuate but little in brightness and give off a steady stream of energy. The balance is achieved by self-regulation: a slight decrease in fusion energy would result in contraction that would heat up the core and increase fusion rate, and vice versa. Other stars, where the balance is not so well tuned, pulsate noticeably. Living on a planet circling a pulsating star presumably would be difficult or impossible.
The Crab Nebula. This is remnant of a supernova that occurred in the year 1054. When nuclear reactions in the core of a star no longer generate enough pressure to offset its weight, the star may explode, as happened here. (Courtesy: VLT)
Thus, the reason that the Sun neither expands (from the ongoing explosion within) nor collapses (from its own weight) is that the two forces keep the balance. In the distant future, when this balance is disturbed because most of the hydrogen is used up, the Sun will expand. This will be the end of the solar system as we know it.
Photo of the Sun, demonstrating sunspots, dark areas of irregular shape on the surface. They are often large enough to see with the naked eye. (Courtesy: NASA)
Thus, on the whole, our star shines with a steady light. However, it has changed its output over geologic time. Also, it varies a bit on a number of cycles. The most obvious manifestation of this is the so-called "sunspot cycle" which describes periodic changes in the abundance of spots on the face of the Sun. The abundance of spots is related to the brightness of the Sun (more spots, more brightness). The variation is less than 1 percent, and the mechanisms are poorly understood. It has to do with changes in the magnetic field of the Sun and with convection within the outer layer of our star (not with processes in the core). Sunspot activity is closely in phase with ejection of solar plasma (protons mainly) and the ensuing atmospheric fireworks in the polar regions of Earth called "aurora".
The Aurora Borealis Charged particles from the solar wind collide with atoms in the Earth's atmosphere to produce the "Northern Lights". (Source: NASA)