The life cycle of the stars
A gas cloud, if massive enough, starts to shrink under its own gravitational force. This shrinkage causes the density and temperature to increase. When the density and temperature are high enough, nuclear fusion reactions among ions become more frequent, and Hydrogen is converted into Helium. Eventually, the outward pressure generated by the fusion reactions balances the gravitational force, the shrinkage stops, and the gas cloud becomes a star. This is the present state of our Sun.
After billions of years, most of the Hydrogen fuel has
been "burned", and there's no longer enough
pressure to balance gravity and the star begins to shrink again.
This causes the core temperature to rise to the point
where the fusion of Helium can occur.
A new equilibrium is reached where the star is
now much larger, because the outer layers have expanded
and cooled. In these conditions the star is called a
red giant (referring to the
color of its outer atmosphere).
Our Sun is supposed to reach this state in about five billion
years, and its radius will reach the orbit of
Mars. A red giant will keep on burning until it its nuclear fuel is
exhausted, then a new contraction will take place.
If there is enough mass left in the star this contraction will heat the
core enough to trigger fusion reactions of
at higher and higher temperatures
until the fusion reactions produce
Beyond Iron the nuclear fusion process cannot release anymore energy, and a red giant start reaches the end of its life. The fusion reactions that powered the star have reduced its mass to the point that gravity is not strong enough to hold the outermost layers; this gaseous envelope is ejected to form a planetary nebula. The core of the star collapses to the point that repulsion between electrons balances the gravitational force and a white dwarf is formed. This is an extremely dense star the size of a planet. Finally, when the white dwarf has radiated all its energy away, it stops shining and becomes a "black dwarf", a dead star. This is expected to be the final state of our Sun.
For stars with higher masses than the Sun (up to about 40
times greater), gravitational collapse will be much faster, lasting
a period of time estimated in the order of few seconds.
An enormous shock wave is produced that pushes the
outer layers of the star away and heats them.
The star becomes extremely bright and large,
comparable to the brightness of a galaxy.
This is a supernova.
In the final gravitational collapse of the supernova core,
gravity overwhelms electron pressure and
electrons and protons are brought close enough together to
be converted into neutrons.
The star collapses down to a radius of few tens of kilometers:
this is what is called a "neutron star".
For stars larger than 40 solar masses the collapse following the supernova explosion is so fast that even the pressure from the neutrons formed in the core is not enough to stop the contraction. The density increases to the point that the velocity needed to escape from the gravitational field is larger than the velocity of light. Light itself is then trapped inside and the object has become invisible: this is a "black hole".