How can one describe the life of a star?
When surrounding clouds of gas (nebulae) and dust in space are enormous enough, their gravity influences them to clasp together. So, it folds itself into the centre of the cloud, making the development of the body denser and more scalding. This formation is called a protostar.
Eventually, the particles lingering in the clouds and dust in space brought up so much in proximity that they started adhering to each other. Therefore, the fusion that initiates to happen generates energy, which is one source of a star.
The core of a protostar gradually becomes searing and dense, and correspondingly, the hydrogen atoms in the core converge to create helium through a process identified as nuclear fusion. Because of hydrogen fusion, it generates energy, which is one trait of a main sequence star. During this period, the star remains relatively stable and shines steadily. (Our Sun is in its main sequence stage!)
Eventually, as the hydrogen supply decreases, the star eventually reaches a point where its core implodes under its weight. Thus, when the density and temperature reach the climax, it starts using the hydrogen atoms to fuel the fusion. As the star initiates helium fusion, it generates additional energy, leading to the expansion of its outer layers. Hence, it will become a red giant.
As the upmost layer gets further and further away from its centre, the force of gravity becomes weaker. Consequently, the star loses its grip on the atmospheric layer, compelling it to drift into space, extending to become a planetary nebula.
Once a star loses its outer layer, it leaves after an innermost shell as a remnant. The centre of the star is extremely small, but the density is still very high. However, since it is no longer active, fusion is no longer taking place, causing the ball to become extremely hot. Over several billion years, as it cools down, the star will eventually become a black dwarf.
However, the stars, which are approximately eight times more extensive than the sun, lead a very different life. They fuse much heavier elements, resulting in them expanding enormously (almost 1000 times bigger than the sun!). Once they've fused elements all the way to iron, the core becomes replete with this heavy element and loses the battle against gravity, making the core full-iron.
Once it happens, no energy is to be gathered from the fusion, so the core collapses, causing a tremendous shockwave explosion that can outshine the entire galaxy for some period. This colossal explosion is known as a supernova.
If the core of a massive star is even more massive, it collapses due to gravity being so strong. Therefore, it becomes a black hole.