Stars are born when a swirling cloud of hydrogen gas and interstellar dust begins to coalesce into a distinct sphere. As the sphere grows, gravity compresses it more and more, and the temperature at the center rises. At some point, the gas and dust become compressed in the center to the point that the temperature is high enough to cause fusion to begin. A new star is born.
During this formative time, much more is going on. As the gas and dust coalesces, its central region begins to trap radiation so the temperature and pressure increases. A star with a mass about that of our sun, at this stage, will be much larger than the Sun, and as much as 1000 times brighter. But its temperature will be much lower than it eventually will be, as its heat at this point is supplied solely by gravitational contraction. However, it is producing light, and so is a protostar.
As the protostar continues to contract, the temperature and pressure at the core continues to increase until fusion begins. Temperatures increase further, and the core pressures increase to the point that they balance the gravitational contraction that has been pulling the gases toward the core. At this point the star is in hydrostatic equilibrium and is a full fledged star.
The basic fusion equation at work here is 2H+3H--->4He + 1n + energy, where n is a neutron.
This birth sequence holds true for stars of any mass above 0.08 solar masses, even giants many times larger than the Sun. A protostar with a mass as low as 0.08 solar masses never achieves nuclear fusion. Its heat and dim luminosity is created solely by gravitational contraction. It has a short life as a brown dwarf. Over a few thousand years it gradually cools and goes dark.
If their luminosity of a star is graphed against its temperature, all stars in their hydrogen burning phase will clump together in a long meandering grouping known as the Main Sequence. In the graph, below, (known as a Hertzsprung-Russel diagram) smaller stars are at the bottom right, and larger stars fall at the upper left of the diagram. The Sun. a fairly mid-size star, falls just about in the middle of the Main Sequence.
Notice as well, as you move through the Sequence, the color of the stars change. The smaller stars are red. Stars about the size of the Sun and up to about four solar masses are yellow. Stars larger become blue. This of course is a function of temperature.
Hydrogen burning stars larger than the small red stars at the lower end of the graph burn for billions of years, remaining in the Main Sequence throughout this period. Our Sun is expected to continue to burn its hydrogen for 10 billion years.
But eventually, all the hydrogen in the core is used up, transformed into helium. Then the star transforms.
When the hydrogen in the core is exhausted, radiation pressure cannot balance gravity, so the star contracts—but only slightly. This is because there is still hydrogen in the outer layers of the star, and it begins fusion. But fusion in these layers causes them to expand. The star becomes a Red Giant. Our Sun will go through this transformation 10 billion years from now, expanding out beyond the orbit of Mars. All inner planets, including Earth, will be scorched.
Hopefully mankind will have colonized at least our arm of the Milky Way by then, and the species will have a new home.
As the outer layers burn their hydrogen, the helium produced migrates to the core. Eventually, the helium builds up to a point that gravitational pressures and temperatures in the core cause the helium to begin fusion. The new energy produced by the core makes it expand. This reduces the fusion of the outer layers, so the total energy output of the star is reduced. This causes the star to contract again.
An important point about the helium cycle is the elements it produces. In stars up to about four solar masses, helium fusion first produces neon, then that fuses to oxygen and carbon. The planetary nebula surrounding the remnants of these former stars is filled with these vital elements.
This phase of a star’s life is extremely volatile. In this stage, it moves to the section of the graph to the right of the Main Sequence. During this period, the star undergoes violent pulsations and loses mass by ejecting material through powerful stellar winds. Eventually it will eject all its outer layers to form a planetary nebula. The star itself has collapsed to a dense small core in which the temperature is high enough to cause carbon to fuse. The star is now about 0.6 solar masses and only about the size of the Earth. It has become a white dwarf. It will continue life in this guise for billions of years.
But this is just the evolution of stars up to about four solar masses. More massive stars have a more explosive evolutionary tale.