"If we could speed up our sense of time until thousands of years were speeding by in the wink of an eye, we would see bright nebulae burst into light, deliver themselves of a shower of stars, then fade back into darkness. As it is we see each nebula frozen at a stage in the process." ~ Timothy Ferris
Stars begin as the offspring of a giant cloud of gas and dust, a cloud up to 300 light-years across. Such a cloud is known as a nebula.
As a nebula orbits the galaxy, events can cause density changes which then cause parts of it to collapse into bursts of star formation. The dark collapsing segments that are forming the shells of the eggs about to hatch into stars are known as Bok globules after an astronomer named Bart Bok.
The nature and qualities of a given star, such as its brightness, color, the length of its life, and how it is to die, depends on its mass. If the mass of the globule is too small the object remains a star-wannabe and is called a brown dwarf.
The most important key to understanding stellar evolution is to graph luminosity versus surface temperature of stars on an X-Y plot. This technique is known as the Hertzsprung Russell Diagram. The surface temperature is closely associated with the color of the star so plotting by color or "spectral type" is the same thing. From hottest to coolest the spectral types are
O B A F G K M.
Through most of their lives, the stars fall along a line on the HR Diagram known as the main sequence. The sun is a main sequence star.
Low Mass Stars
The cooler red dwarfs burn hydrogen very slow and efficiently and so tend to remain on the main sequence for hundreds of billions of years. More massive hot giant stars evolve quickly and leave the main sequence after just a few million years. Stars like our Sun, which are roughly average, remain on the main sequence for about 10 billion years.
During its time on the main sequence a star produces energy by converting hydrogen into helium in its core through the process of nuclear fusion. Once the hydrogen is exhausted in the core, the outward pressure is decreased and gravity begins to crush the star inward. What happens next differs greatly depending on the total mass of the star.
Stars of low mass cannot fuse helium into heavier elements and slowly collapse into a white dwarf. White dwarf stars are still hot from their previous phase and from the collapse, but destined to slowly cool and eventually become a cinder in space.
Stars of sufficient mass eventually fuse helium into carbon, nitrogen, oxygen, and heavier elements. How far up the fusion chain of element production a star can go depends on its mass but the limiting element is iron, which requires more energy input than can be returned by fusion. Iron is nuclear ash.
The Sun (1 solar mass) will go through a period when its size will increase and its surface temperature will cool. In this phase stars are known as Red Giants. At the end of this phase the Sun will cast of its outer atmosphere which will expand into space creating an object known as a planetary nebula. The remaining mass of the sun will collapse into a white dwarf about the size of Earth, with no ability to produce nuclear fusion.
High Mass Stars
When a very massive star, above approximately 2.5 solar masses, reaches the point of decreasing returns of energy from its ability to fuse the nuclei of heavy elements, it will collapse inward.
The added gravitational energy delivered by the collapse will cause it to fuse iron and heavier elements in a huge explosion known as a supernova. After the supernova, the collapsed core of the star can form a neutron star.
Pressure from the collapse converts the majority of the protons into neutrons. The density of the resulting neutron soup is extreme. A tablespoon full is as massive as a large mountain. A neutron star may only be about 10 miles across but be far more massive than our Sun.
If the mass of a collapsing star is high enough, the neutrons will not be enough to prevent a collapse of the star to a radius so small that the escape velocity from that region will be greater than the speed of light. This strange condition is known as a black hole.