There are hundreds of billions of stars in the Milky Way alone; young and old, large and small, quiet and violent. But they all started out in the same way. Let’s take a look at thebirth of stars.
When we look out in the Milky Way, what we see are the stars, but a large part of the galaxy’s mass comes from clouds of molecular hydrogen; the stuff of future stars. These clouds are happy to drift along in the Milky Way for millions and even billions of years until some kind of event causes the cloud to collapse. It could be the collision between two clouds, or the shockwave of a passing supernova. This pushes the cloud over the top and gives gravity a chance to take over, and begin collapsing the cloud together.
As the cloud collapses, big pieces shear off. Each of these will become a star of their own. The mutual gravity on each chunk of the cloud continues to pull the material inward. The conservation of momentum from all the individual particles in the cloud makes it start to spin.
The first stage in the birth of a star is called a protostar. This is where the majority of the stellar material has collected together in ball in the center, but there is a huge disk of gas and dust obscuring it from our view. As long as there is still inflowing material, the object is a protostar. After enough material falls in on the star, jets of material blast out from either pole, announcing the new protostar to the Universe. The protostar stage takes about 100,000 years to complete.
Once there’s no more material falling inward, all that’s left is a hot ball of gas. Astronomers call this stage a T Tauri star. It doesn’t have internal temperature and pressure to begin nuclear fusion at its center, but it’s still a very hot object, and can appear as bright as a regular star. Over the next 100 million years, gravity continues to collapse the T Tauri star until the temperature at its core reaches the point that nuclear fusion can begin.
At this point, the star makes a transition to the main sequence stage of its life. This is a place it’ll remain for millions, billions, and even trillions of years depending on its mass.