Stars are born, become middle aged and eventually die (usually in a spectacular fashion). In the process, they make almost everything in the Universe.
The Sun is our own special star yet, as stars go, it is a very average star. There are stars far brighter, fainter, hotter and cooler than the Sun. Basically, however, all the stars we can see in the sky are objects similar to the Sun.
A star is a great ball of gas held together by its own gravity. The force of gravity is continually trying to compress the star towards its centre. If there were not some other force counteracting gravity, the star would collapse. Outward pressure is produced by the radiation from nuclear energy generation in the Sun's interior.
How do stars originate?
Stars form from concentrations in huge interstellar gas clouds. These contract due to their own gravitational pull. As the cloud's density rises, it becomes more and more difficult for heat to escape and the temperature at the centre of the cloud rises. If the cloud is big enough, the temperature rise is sufficient for nuclear fusion reactions to begin. These generate more heat and the 'burning' of hydrogen into helium begins, as in the Sun.
Early life of a star
In its early stages the embryonic star is still surrounded by the remains of the original gas cloud from which it formed. By this stage the cloud remnant takes the form of a disk around the star. The radiation from the star gradually dissipates this disk, possibly leaving behind a system of smaller objects, planets.
The star now settles down to a long period of stability while the hydrogen at its centre is converted into helium with the release of an enormous amount of energy. This stage is called the main-sequence stage.
The more massive a star is the quicker it 'burns' through its hydrogen and hence the brighter, bigger and hotter it is. The rapid conversion of hydrogen into helium also means that the hydrogen gets used up at a greater rate in the more massive stars than the smaller ones. For a star like the Sun, the main-sequence stage lasts about 10,000,000,000 years whereas a star 10 times as massive will be 10,000 times as bright but will only last 100,000,000 years. A star one tenth of the Sun's mass will only be 1/10,000th of its brightness but will last 1,000,000,000,000 years, longer than the current age of the Universe.
Post main-sequence evolution
Stars do not all evolve in the same way but eventually all of them run out of fuel. In smaller stars, the hydrogen will eventually be all used up. The star will then just get cooler and cooler ending up after about 1,000,000,000,000 years as a 'black dwarf'. In larger stars like our Sun, the core of the star contracts until it is hot enough for helium to be converted into carbon. Hydrogen continues to fuse into helium in a shell around the core, but the outer layers of the star have to expand. This makes the star appear brighter and cooler and it becomes a red giant. Eventually the energy generation will fizzle out and the star will collapse to what is called a 'white dwarf'.
Supergiants and supernovae
There are very few masses greater than five times the mass of the Sun but their evolution ends in a very spectacular fashion. Once their hydrogen is used up, they go through a series of reactions until they end up creating iron. At this point, no more energy can be generated, and there is no longer a source of pressure to counteract the crushing pull of gravity. The star's core then starts to contract rapidly, collapsing on a timescale of less than one second.
The core collapse in the dying star releases a vast amount of gravitational potential energy and the star becomes a supernova. During this explosive phase all the elements with atomic weights greater than iron are formed and, together with the rest of the outer regions of the star are blown out into interstellar space.
“The nitrogen in our DNA, the calcium in our teeth, the iron in our blood, the carbon in our apple pies were made in the interiors of collapsing stars. We are made of starstuff.”
― Carl Sagan, Cosmos