The Life and Death of Stars (Astronomy)

These main stars include the sun, which produces enormous energy. (Journey to the Cosmic Frontier, p43)The enormous energy produced mainly depends on the mass of the star. What happens during the formation of the stars is, The gravity pulls dust and the gases inwards towards the core, then the temperatures increase leading to collision of the atoms .Finally the gas pressure comes to an equilibrium with the gravity and the accretion comes to a halt .These ordinary stars can live for long.
The ordinary stars exhaust hydrogen in its core and there is no longer source of heat to support the center against the gravitational pull. The hydrogen gas burns continuously in a shell at the center and the star changes to a red giant ball. This red giant ball will deposit the entire heat on our planets and will die finally. (Journey to the Cosmic Frontier,