Building Blocks of the Universe
Space isn't empty at all: it is filled with gas and dust. This mixture of gas and dust is known as the "interstellar medium," this it is composed of 99 percent gas and 1 percent dust. Most of this gas is hydrogen, and most of the rest of it is helium. But some organic compounds, including long-chain hydrocarbons, are also present in space. In some parts of space, clouds of dust and gas form. Some of these clouds, such as the Orion Nebula, are visible from Earth even through a small backyard telescope.
The Star Nebula
Clouds of interstellar gas are loosely held together by gravity. These clouds are called star nebula, and they may remain undisturbed for thousands of years. Eventually, the movement of a passing star may stir up the mixture of dust and gas, causing some of the material to move close together. Because star nebulae are the birthplace of stars, they are also frequently called stellar nurseries.
The Protostar
Gravitational force causes the star nebula to begin to collapse in on itself. As the dust and gas come together, they begin to heat up. Eventually, the matter becomes so dense and hot that it forms a protostar. Protostars are not very stable and may not go on to be true stars. If the gas within the protostar does not get hot enough, it will not achieve nuclear fusion and the protstar then becomes a brown dwarf.
The Life of a Star
If the protostar contracts enough and becomes hot enough that it is successful in fusing its hydrogen into helium, it becomes what is called a "main sequence star." The fully grown star spends its entire lifetime, which can run to billions of years, fusing hydrogen. As it burns this fuel, it continues to slowly contract, which in turn causes it to heat up. When the star runs out of hydrogen it is at the end of its lifecycle. Massive stars may begin to fuse their helium and create other elements, such as carbon and iron, as byproducts.
Planetary Nebula
As stars reach the end of their lifecycle, some of the more massive ones will collapse in on themselves and explode, producing novae or supernovae. These explosions release huge amounts of energy, and for a few weeks a supernova may be brighter than an entire galaxy. Supernovae also produce a wide range of elements and subatomic particles, all of which are thrown outwards in the tremendous explosion. These elements go on to become interstellar matter--dust and gas--and will eventually become star nebulae and start the star lifecycle again.