In cosmology, stellar evolution refers to the changes which stars undergo during their "lifetime". Some astronomers argue that the term "evolution" is inappropriate for this subject; such astronomers use the term "life cycle" instead. Over time, the color, luminosity, size, and temperature of stars will change. One does not study stellar evolution by observing the life cycle of a single star; but rather, by observing numerous stars, each at a different point in its life cycle.
In the beginning, there is the Giant Molecular Cloud. Most of the empty space inside a galaxy actaully contains around 0.1 to 1 particles per cubic centimeter; the cloud, on the other hand, contains hundeds per cm3 (compare with 100,000 in a good vacuum tube). Despite this sparcity, each Giant Molecular Cloud contains 100,000 to ten million times as much mass as our sun by virtue of being (unsurprisingly) giant -- 50 to 300 light years across.
The cloud is stable, its constituent molecules too widely spaced for gravity to draw them closer, until a supernova explodes nearby, sending out a shockwave of successive compression and rarefaction analogous to a soundwave travelling through air, forming knots of matter, cores of greater density. When density exceeds 100,000 atoms / cm3, gravity takes over, and the region begins to collapse into a protostar (each dense core will produce anywhere from 1 protostar to tens of thousands). The atoms gain speed in their fall toward the center, providing the protostar with heat and a weak infra-red glow -- heat is defined as particle motion -- and rotation (think of an ice skater pulling in her arms as she goes into a spin). (Protostars can be detected in Bok Globules.)
In some protostars, contraction remains the only source of energy; these are brown dwarfs, and they die away slowly, over hundreds of billions of years. If a protostar is massive, though, if matter at the bottom (the center) has enough on top of it -- the threshold is around 15 MK (15 million degrees Celsius) -- the electrons are stripped from their parent atoms, creating a plasma. Contraction continues, and eventually the speed of the atomic nuclei is great enough to overcome the electrical repulsion keeping them apart and nuclear fusion occurs: hydrogen nuclei fuse to form helium in the proton-proton chain or by the CNO cycle.
In doing so, they give off a tremendous amount of energy, which pours out from the core, setting up an outward pressure in the gas around it that balances the inward pull of gravity, stopping the protostar's contraction. When the energy reaches the outer layers, it continues into space in the form of electromagnetic radiation -- among other things, light.
New stars come in a variety of sizes and colors. They range from blue to red, from less than half the size of our Sun to over 20 times its size. The brightness and color of a star depends on the its surface temperature, and the star's temperature, at this point in its life, depends on its mass. (T Tauri stars, for example, are in the early stages of life.)
The remainder of the star's existence will be a tug of war between gravity, which wants to crush the star into nonexistence, and the fusion going on inside, which wants to explode the star and send pieces of it hurtling through the universe.
A new star will fall at a specific point on the main sequence of the H-R diagram. It will rest there for a period of millions (for the biggest and hottest stars) to billions (for mid-sized stars like the Sun) to tens or hundreds of billions (for red dwarfs) of years, expending most of the hydrogen in its core. Eventually the supply of hydrogen runs out and the star begins its demise.
After millions to billions of years, depending on their initial masses, stars run out of their main fuel - hydrogen. Once the ready supply of hydrogen in the core is gone, nuclear processes occurring there cease. Without the outward pressure generated from these reactions to counteract the force of gravity, the outer layers of the star begin to collapse inward toward the core. Just as during formation, the temperature and pressure increase. This will force helium fusion in the core. The newly generated heat temporarily counteracts the force of gravity, and the outer layers of the star are now pushed outward. The star expands to larger than it ever was during its lifetime -- a few to about a hundred times bigger. It has become a red giant.
What happens next depends, once more, on the star's mass.
Once a medium size star (0.4 to 3.4 times the mass of our Sun) has reached the red giant phase, its outer layers continue to expand, the core contracts inward, and helium atoms in the core fuse together to form carbon. This fusion releases energy and the star gets a temporary reprieve. However, in a Sun-sized star, this process might only take a few minutes! The atomic structure of carbon is too strong to be further compressed by the mass of the surrounding material. The core is stabilized and the end is near.
The star will now begin to shed its outer layers as a diffuse cloud called a planetary nebula. Eventually, only about 20% of the star's initial mass remains and the star spends the rest of its days cooling and shrinking until it is only a few thousand miles in diameter. It has become a white dwarf. White dwarfs are stable because the inward pull of gravity is balanced by the degeneracy pressure of the star's electrons. (This should not be confused with the electrical repulsion of electrons, but is a consequence of the Pauli exclusion principle.) With no fuel left to burn, the hot star radiates its remaining heat into the coldness of space for many millions of years. In the end, it will just sit in space as a cold dark mass sometimes referred to as a black dwarf. The universe is not old enough for any black dwarf stars to exist yet.
Fate has something very different, and very dramatic, in store for stars which are some 5 or more times as massive as our Sun. After the outer layers of the star have swollen into a red supergiant (i.e., a very big red giant), the core begins to yield to gravity and starts to shrink. As it shrinks, it grows hotter and denser, and a new series of nuclear reactions begin to occur, temporarily halting the collapse of the core. Then silicon fuses to iron-56. Up until now, all these fusion reactions have liberated energy. However, iron will not fuse. So suddenly there is no energy outflow to counteract the enormous forces of gravity, and the star collapses. What happens at this point is not clearly understood. [1] But whatever happens can cause a supernova explosion in less than a fraction of a second, [1]
making one of the most spectacular displays of power in the Universe.
And the accompanying surge of neutrinos starts a shock wave, while the continuing jets of neutrinos blast much of the star's accumulated elements, the so-called seed elements up to iron, into space. As the material blasted into space spews from the star, the continuing neutrino stream bombards the escaping material. And, as the escaping seed elements continue to capture neutrinos, the neutrino bombardment turns significant portions of the seed elements into neuclei heavier than iron, including the radioactive elements up to uranium. Without supernovae, these elements wouldn't exist.
The shock wave and jets of neutrinos continue to propel the material away from the dying star, off into interstellar space. Then streaming through space, the material from the supernova may collide with other cosmic debris, perhaps to form new stars, perhaps to form planets and moons, perhaps to serve as raw materials for a vast variety of living things.
So what, if anything, remains of the core of the original star?
Because we do not have a good understanding of the actual explosion mechanism, it is not entirely clear. It is known that in some supernovae, the intense gravity inside the supergiant causes the electrons to be forced the atomic nuclei, combining with the protons to form neutrons. The whole core of the star becomes nothing but a dense ball of neutrons the size of Manhattan, a neutron star.
It is still an open question whether or not all supernovae do form neutron stars, however. It is believed that if the stellar mass is high enough, the neutrons themselves will be crushed and the star will collapse until its radius is smaller than the Schwarzschild radius and it becomes a black hole. However, our understanding of stellar collapse is not good enough to tell us whether it is possible to collapse directly to a black hole without a supernova, if there are supernovae which then form black holes, or what the exact relationship is between the initial mass of the star and the final object that remains.
See also:
Birth
Maturity
Beginning of the End
The End
The Fate of Sun-Sized Stars: Black Dwarfs
The Fate of Massive Stars: Supernovae! and Then...
Shock wave expands.