Most of the stars in the galaxy, including the Sun, are considered as main sequence stars. Main sequence stars are classified by their energy source. A star fuels itself by continually fusing hydrogen into helium within its core. The rate of this fusion varies relative to the mass of the star. The bigger the mass of the star, the more hydrogen it can fuse into helium. The mass of the star is the most important factor to determine the lifespan, the size and the luminosity of a main sequence star.
A star is composed of gas, held together into a sphere by its own gravity. This gravity tends to cause a star to collapse. However, it is counterbalanced by the radiation emitted in the interior of the star, called the hydrostatic support. The nuclear reactions near the center of the star provide interior heat and the radiation for the most part of a star’s life span. This long phase of the life of a star is called the main sequence.
Before the main sequence phase, a star’s interior is not yet dense enough to begin nuclear reaction. During this time, the contraction of the star which generated heat provides hydrostatic support. But, after the main sequence, the star has already used up its nuclear fuel in its core. When the star can no longer provide enough hydrostatic support, it will eventually collapse due to its own gravity.