This is a long explanation on how stars are formed and how they die. Hope it is useful.
Stars are born from gas and dust mainly made up of hydrogen and helium atoms. This gas is dispersed thinly over space. But in some regions atoms lie closely together. Each atom is gravitationally attracted to each other creating an even denser region. This attracts more and more atoms. Eventually, this may form a large cold cloud. 10,000 years later this becomes spherical in shape.
As atoms get closer together their GPE (gravitational potential energy) decreases and their KE (kinetic energy) increases. This causes an increase in temperature of the gas. When the temperature gets hot enough gas will begin to glow very weakly. At this point the ball of gas is called a PROTOSTAR. If the ball of gas does not have enough mass because not enough atoms have been collected, it will remain in this form for the rest of it's life. Astronomers call this type of star a "BROWN DWARF".
The centre of the ball of gas will be the densest and hottest region. If the temperature reaches around 15 million degrees, the pressure becomes very high. In these conditions hydrogen atoms are stripped of their electrons and have enough energy to overcome their electrostatic repulsion. These atoms can be brought together at such a force that they start fusing together. People refer to this as nuclear fusion. At this point the true life of the star begins. The star is now a MAIN SEQUENCE.
Stars will have collected different amounts of gas, so will be different sizes. There are two paths a main sequence star can take.
Smaller stars for example our sun will eventually run out of hydrogen fuel to fuse together. So nuclear fusion in the core stops. This means that there is now…