Compared with stellar lifetimes, the few hundred years humans have spent studying the stars with telescopes is like studying someone's whole life based on 1 minute of observing them. We see only a brief moment in any star's life, but from many of these moments from many different stars we try to construct the basic life cycles of stars.

From these moments the following information has been deduced. Stars are formed from great clouds of gas and dust, usually as members of large groups. They all begin their lives with roughly the same composition: about 75% hydrogen, about 25% helium and only a smattering of elements heavier than helium.  The new stars can light up these clouds, and then we see them as
emission nebulae, like the Orion and Rosette nebulae below.  They have a variety of shapes.
 
 
 
 
Stars usually form in clusters, like these:
 
 
These clusters tend to disperse over millions to billions of years, so a random field of stars like the image below mainly consists of mature, isolated stars no longer in clusters:
 
 
But now back to the life cycle of an individual star.
 
The forming stars collapse until they are so dense and hot that energy begins to be generated in their cores by nuclear reactions. This reaction is the fusion of hydrogen into helium. This Main Sequence stage of a star's life lasts the longest. For our star, the Sun, this stage has lasted about 5 billion years and will last about 5 billion years more. The star stays almost fixed at one position on the Main Sequence, depending on its mass, in the H-R diagram during this time.
 
 
 
 
 
 
 
 
 
 
When the star has used up most of the hydrogen in its core, its starts to contract.
 
As the core contracts, the rest of the star contracts along with it. This brings the closest outer layer of hydrogen near the hottest part of the star, causing the hydrogen to burn very vigorously in a shell around the core while the inert core contracts. This extra heat radiates outward and `puffs' the star up into a big, luminous red giant. These are cool (remember red is cool) large stars. As a reference, when our Sun becomes a red giant (a long time from now, don't worry) it will get about three times as big as it is right now. This stage in a star's life doesn't last very long, only about 100 million years in the case of our Sun (about 2% of its life). During this stage of a star's life the star appears toward the top and right of the H-R diagram.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Eventually, the helium ignites in the core, fusing into carbon and oxygen.  The star moves a bit down and to the left in the H-R diagram, becoming a Horizontal Branch star.
 
 
 
Once this process is finished, the core contracts again, and fusion again starts in shells around the core, but now there is an outer shell where hydrogen is fusing into helium, and an inner shell where some of that helium produced fuses into carbon and oxygen.  The shell fusion is again very vigorous and causes the star to expand greatly, becoming a red supergiant.   The star once again moves upward and to the right in the H-R diagram.

 

 

 

After this stage, for stars like the Sun, winds and other processes in the star eject its remaining outer layers into space. The layers expand at a speed of 10-30 km/s.  The core is then very compact and very hot and is called a white dwarf. It still emits a lot of energy which lights up these ejected layers causing them to glow brightly as a planetary nebula (it really has nothing to do with planets; the name is a historical accident).  They often appear as rings or bi-conical shapes, like these examples:
 
 
 

Within a million years the nebula fades and the core will simply continue to cool and finally the star is said to be dead. This is the fate that awaits our Sun in about 5 billion years. The white dwarf phase is represented by the lower left portion of the HR diagram. Click here for a movie of the Helix Nebula showing how a planetary nebula forms.

This animation shows this whole evolutionary sequence for the Sun.

Other processes happen to stars that have higher masses than our Sun. High mass stars, those that begin their life at 8 solar masses or above, burn briefly and violently in a different reaction than the above mentioned life cycle. They only burn for millions of years, instead of billions of years. They end their lives in dramatic fashion through supernova explosions.  The exploding material expands away from the star at tens of thousands of km/s!  What is left behind is a dense, compact core such as a neutron star or, if the star was massive enough, a black hole.  The debris from such an exploded star is called a supernova remnant.   These remnants look much more violently explosive than a planetary nebula, often with a very filamentary structure.