Stars, such as the sun, are large balls of plasma that can produce light and heat in the area around them. While these stars come in a variety of different masses and forms, they all follow the same basic seven-stage life cycle, starting as a gas cloud and ending as a star remnant.
Giant Molecular Cloud
A star begins life as a large cloud of gas. The temperature inside the cloud is low enough for molecules to form. Some of the molecules, such as hydrogen, light up and allow astronomers to see them in space. The Orion Cloud Complex in the Orion system serves as a nearby example of a star in this stage of life.
As the gas particles in the molecular cloud run into each other, heat energy is created, which allows a warm clump of molecules to form in the gas cloud. This clump is referred to as a Protostar. Since Protostars are warmer than other material in the molecule cloud, these formations can be seen with infrared vision. Depending on the size of the molecule cloud, several Protostars can form into one cloud.
In the T-Tauri stage, the young star will begin to produce strong winds, which will push away the surrounding gas and molecules. This allows the forming star to become visible for the first time, without the help of other devices to see it, such as infrared.
Main Sequence Star
Eventually, the young star reaches hydrostatic equilibrium, in which its gravity compression is balanced by its outward pressure, giving it a solid shape. The star then becomes a Main Sequence Star. The star will spend 90 percent of its life in this stage and spends most of its time fusing hydrogen molecules, forming helium in its core. The sun of our solar system is currently in its Main Sequence state.
Once all of the hydrogen in the star's core is converted to helium, the core will collapse on itself, causing the star to expand. As it expands, it will be classified as a Subgiant, then a Red Giant. The Red Giant will have a cooler surface; and because of this, it will appear red rather than yellow. If the star was big enough before expanding, it may become large enough to be classified as a Supergiant.
After expanding, the star may become large enough to begin fusing the helium molecules in its core. Once this process ends, the core shrinks, and the star will repeat Step 5 again. This process will repeat until iron begins appearing in the core. Since iron absorbs energy, the iron will cause an explosion in the core of the star and lead to a Supernova explosion.
After the supernova explosion, the exploded core of the star will be visible and is referred to as a White Dwarf. If the star isn't that large, it will simply become a planetary Nebula. This formation will expand over time but will cool as it expands. The neutrons that form in the star will bump up against each other, forming a Neutron star. However, the gravity around the star will eventually cause its collapse, forming a black hole.