Main sequence stars form from the gravitational collapse of dense regions within molecular clouds. As the cloud contracts, it fragments into smaller clumps, each of which can form a new star. The collapse causes the temperature and pressure in the core of each clump to increase until nuclear fusion ignites, marking the birth of a new star.