Stars begin as particles in a cold cloud of dust. According to How It Works, these particles only develop into a star if a force causes the particles to collide with each other. Otherwise, the particles remain cold and lifeless for ages.
For a cloud of dust to develop into a star, it requires a catalyst to stir up the particles. Often, this occurs when a comet rushes through the particles or when a shockwave from a supernova stirs up the particles. When the comet or supernova moves the particles around, it helps them clump together, which is the beginning of a star's development. Once the particles begin to clump, it creates a mass, and along with it a gravitational pull, which attracts even more particles. As more and more particles are pulled into the clump, its center begins to grow denser and hotter.
Over millions of years, the clump develops into a smaller and denser body known as a protostar, which continues to grow hotter and draws in more gas. When the protostar reaches about 7 million degrees Kelvin, hydrogen atoms begin to fuse together, which produces helium and a flow of energy particles. This process is known as nuclear fusion.
The protostar continues to attract particles into its core, which makes it hotter. After millions of years, the protostar becomes so dense that it collapses, which results in a bipolar flow. As a result, fire erupts from the protostar and begins to burn the gas surrounding it. After this occurs, the protostar has become a main sequence star; it remains so until it burns through the remainder of the gas.