Approximately 200 million years after its inception, the universe consisted of massive, slowly swirling nebulae with large voids in between. Because of the effects of gravity, denser regions of these nebulae started to attract gases from their surroundings and thereby started to grow in mass. These regions pulled in progressively more matter and as they became more condensed over time, the initial swirling movement of the gases transformed into a progressively faster rotation around an axis in accretion disks. Eventually, the gravitational attraction of these spinning accretion disks grew strong enough to cause complete inward collapse of the surrounding nebulae. Gravity further moulded the inner portions of these accretion disks into dense balls and consequently large amounts of energy were transformed into heat. These hot balls of gas ultimately became the first precursors of stars, so-called protostars.
Protostars continued growing until their cores became very dense and reached a temperature of approximately 10 million degrees. Under these conditions, hydrogen nuclei joined to form helium nuclei in a series of fusion reactions that released tremendous amounts of energy. The bodies of the protostars began to light up, resulting in the formation of the first true stars approximately 400 million years after the universe was born.
Stars of the first generation were generally very massive (for example, 100 times the mass of the Sun) because of the large amounts of matter present in the young nebulae. These stars burned very hot and bright, but consequently their lifetime was also relatively short – only a few million years. When stars exhaust all of their resources, they die in a dramatic explosion and flash of light known as a supernova.
Book reference: Marshak, S. (2007). Earth: Portrait of a Planet: Third International Student Edition. WW Norton & Company.
Image: The Pillars of Creation in the Eagle Nebula as seen from the Hubble Space Telescope. Credit: NASA/ESA/Hubble Heritage Team.