The structure of a typical star was worked out by astrophysicists after 1920, largely based on observations of the Sun. The photosphere is the visible surface of a star and is the layer to which the surface temperature and radius apply. Constantly changing features appear there. These include sunspots; bright, grainlike patches called granulations; and dark, threadlike filaments of exploding gases that appear as prominences when seen at the edge of the star.

Above the photosphere are upper atmospheric layers, mostly transparent, which on the Sun are called the chromosphere. Gases in a stellar atmosphere absorb characteristic lines in the spectrum and reveal the chemical composition of the star. The temperature of the stellar atmosphere is lower than the temperature of the photosphere.

Above the atmosphere is a transparent corona of diffuse gas at high temperature. For reasons that are as yet uncertain, outgoing energy from the Sun or star heats the corona to temperatures over 1,000,000 K (1,800,000° F), so that it emits X rays of much shorter wavelength than visible light. The solar corona also has emission lines in visible light which give it the greenish glow visible during a total solar eclipse. In the atmosphere and corona of a star, explosions known as flares occur in regions several thousand kilometers across, shooting out high-speed protons and electrons and causing plumes of higher temperature in the corona. High-speed protons and electrons are also shot out in all directions to form the solar or stellar wind.

The solar wind has been detected by the two Voyager spacecraft and Pioneer 10 and 11 on their way out of the solar system. By 1993 they had already apparently detected the outer boundary of the solar wind, the heliopause, where interstellar gas pressure stops the outflow of the wind. According to their observations, the heliopause lies at a distance of 82 to 130 astronomical units from the Sun - that is, 82 to 130 times farther from the Sun than is the Earth.

The knowledge of a star's internal structure is almost entirely theoretical, based on laboratory measurements of gases. Beneath the photosphere are several layers, some where the hot, ionized gas is turbulent, and some where it is almost at rest. Calculations of structure are based on two principles: convective equilibrium, in which turbulence brings the energy outward, and radiative equilibrium, in which radiation brings the energy outward. The temperature and density are calculated for each depth, using the characteristics of the mix of gases (hydrogen, helium, and heavier elements) derived from the spectrum of the atmosphere. The pressure is calculated from the weight of the gases overhead.

Eventually, deep in the interior, the temperature and density are high enough (10,000,000 K and 30 g/cm3) for a nuclear reaction to occur, converting four hydrogen atoms(4 1H) to one helium atom (4He), with a 0.7% loss of mass. The conversion of this mass (m) to energy (E) follows Einstein's equation E = mc2, where c is the velocity of light. Therefore such a reaction releases 6.4 X 1018ergs of energy per gram of hydrogen, 60 million times more than chemical reactions such as the burning of hydrogen in oxygen. This enormous source of energy makes long-lasting, self-luminous stars possible.

In an attempt to determine the precise mechanism providing the energy for stars, physicists in the early 1930s measured the rates of several nuclear reactions in the laboratory. In 1938, Hans Bethe showed that the carbon-nitrogen cycle could account for a star's long-lasting luminosity. In Bethe's theory, carbon-12 acts as a catalyst in the conversion of hydrogen to helium. The small amount needed is converted to nitrogen-14, then converted back to carbon to be used again. The Bethe reactions are (1) carbon-12 + hydrogen-1 → carbon-13 + positron + photon + neutrino; (2) carbon-13 + hydrogen-1 → nitrogen-14 + photon; (3) nitrogen-14 + hydrogen-1 → nitrogen-15 + photon + neutrino; (4) nitrogen-15 + hydrogen-1 → carbon-12 + helium-4 + photon. A positron is a positive electron, the photons are short-wavelength gamma rays, and the negative electrons are ignored because the atoms of hydrogen, carbon, and nitrogen are fully ionized (all electrons removed). The reaction rates at the temperature and density in the core of the Sun are fast enough to produce 1033 ergs/sec, the luminosity of the Sun.

Later it was shown that the proton-proton reaction could also produce the Sun's luminosity. More recent studies show that in the Sun and smaller stars, where temperature and density in the core are lower than in larger stars, the proton-proton reaction beats out the Bethe cycle and can occur with no carbon-12 or nitrogen-14 present, if the temperature is about 10,000,000 K. Equations for the proton-proton reaction are (1) hydrogen-1 + hydrogen-1 → hydrogen-2 + positron + neutrino; (2) hydrogen-2 + hydrogen-1 → helium-3 + 3 photons; (3) helium-3 + helium-3 → helium-4 + hydrogen-1. The rates increase with the fourth power of the temperature, so that at a temperature of 20,000,000 K the rate is 16 times faster than at 10,000,000 K. Lithium-7 and beryllium-7 are probably also involved.

The neutrino is a very-low-mass particle that is produced in the Sun's core and can pass through its outer regions to enter space. One of the great mysteries of modern astrophysics for many years was the failure of experiments to detect the neutrinos expected from nuclear reactions in the Sun. Various potential explanations were attempted, including the possibility that the solar neutrinos fail to be detected because they change to other forms of neutrinos. Astrophysicists in 2001 determined that this is what happens.

Whether by the Bethe cycle or by the proton-proton reaction, the Sun and other stars are converting hydrogen to helium in their cores at a considerable rate (600,000,000 tons/sec in the Sun). Because helium has different characteristics, this conversion changes the structure of the star. During the process there is a central core composed entirely of helium, a spherical shell around it in which hydrogen is being converted to helium, and the rest of the star, composed mostly of hydrogen. When a large core of helium has been created, the core may collapse, and new nuclear reactions may start as the temperature and density jump to very high values. When the temperature exceeds 100,000,000 K, helium is converted to carbon by the triple-alpha (ionized helium) process: (1) helium-4 + helium-4 → beryllium-8; (2) helium-4 + beryllium-8 → carbon-12 + photon.

Astrophysicists make use of the Hertzsprung-Russell diagram and large computers to calculate how stars evolve. The most massive stars rapidly change from blue giants to red giants and may become unstable and pulsate as variable stars during this stage. Stars of lesser mass, such as the Sun, spend a large fraction of their lives on the main sequence of the diagram while they convert hydrogen to helium. After several billion years, these stars become white dwarfs. Depending on mass and other circumstances, a star may evolve to a nova or supernova, pulsar, neutron star, or black hole. Because stars beyond our Sun lie outside the distance range for studying their individual behaviors, they are known simply by their general characteristics in terms of stellar type. In 2001, however, the corona of a cool star (CN Leonis) only eight light-years distant was observed for the first time, opening up the possibility of detailed studies of the cycles of behavior of other stars in the future.