Answer :

reoliz
Irregularities in the density of the gas causes a net gravitational force that pulls the gas molecules closer together. Some astronomers think that a gravitational or magnetic disturbance causes the nebula to collapse. As the gases collect, they lose potential energy, which results in an increase in temperature. 

As the collapse continues, the temperature increases. The collapsing cloud separates into many smaller clouds, each of which may eventually become a star. The core of the cloud collapses faster than the outer parts, and the cloud begins to rotate faster and faster to conserve angular momentum. When the core reaches a temperature of about 2,000 degrees Kelvin, the molecules of hydrogen gas break apart into hydrogen atoms. Eventually the core reaches a temperature of 10,000 degrees Kelvin, and it begins to look like a star when fusion reactions begin. When it has collapsed to about 30 times the size of our sun, it becomes a protostar. 

When the pressure and temperature in the core become great enough to sustain nuclear fusion, the outward pressure acts against the gravitational force. At this stage the core is about the size of our sun. The remaining dust envelope surrounding the star heats up and glows brightly in the infrared part of the spectrum. At this point the visible light from the new star cannot penetrate the envelope. Eventually, radiation pressure from the star blows away the envelope and the new star begins its evolution. The properties and lifetime of the new star depend on the amount of gas that remains trapped. A star like our sun has a lifetime of about 10 billion years and is just middle-aged, with another five billion years or so left.

Hope i helped! :D

Other Questions