<P> Nuclear fusion powers a star for most of its life . Initially the energy is generated by the fusion of hydrogen atoms at the core of the main - sequence star . Later, as the preponderance of atoms at the core becomes helium, stars like the Sun begin to fuse hydrogen along a spherical shell surrounding the core . This process causes the star to gradually grow in size, passing through the subgiant stage until it reaches the red giant phase . Stars with at least half the mass of the Sun can also begin to generate energy through the fusion of helium at their core, whereas more - massive stars can fuse heavier elements along a series of concentric shells . Once a star like the Sun has exhausted its nuclear fuel, its core collapses into a dense white dwarf and the outer layers are expelled as a planetary nebula . Stars with around ten or more times the mass of the Sun can explode in a supernova as their inert iron cores collapse into an extremely dense neutron star or black hole . Although the universe is not old enough for any of the smallest red dwarfs to have reached the end of their lives, stellar models suggest they will slowly become brighter and hotter before running out of hydrogen fuel and becoming low - mass white dwarfs . </P> <P> Stellar evolution is not studied by observing the life of a single star, as most stellar changes occur too slowly to be detected, even over many centuries . Instead, astrophysicists come to understand how stars evolve by observing numerous stars at various points in their lifetime, and by simulating stellar structure using computer models . </P> <P> Stellar evolution starts with the gravitational collapse of a giant molecular cloud . Typical giant molecular clouds are roughly 100 light - years (9.5 × 10 km) across and contain up to 6,000,000 solar masses (1.2 × 10 kg). As it collapses, a giant molecular cloud breaks into smaller and smaller pieces . In each of these fragments, the collapsing gas releases gravitational potential energy as heat . As its temperature and pressure increase, a fragment condenses into a rotating sphere of superhot gas known as a protostar . </P> <P> A protostar continues to grow by accretion of gas and dust from the molecular cloud, becoming a pre-main - sequence star as it reaches its final mass . Further development is determined by its mass . Mass is typically compared to the mass of the Sun: 1.0 M (2.0 × 10 kg) means 1 solar mass . </P>

How do all stars begin their early development