Star formation is the process by which dense regions within molecular clouds collapse under their own gravity to form stars. These clouds, primarily composed of hydrogen gas and dust, can trigger star formation when they become unstable, often due to external forces like shock waves from nearby supernovae or collisions with other clouds. As the material collapses, it heats up, eventually forming a protostar at the center.
As the protostar continues to gather mass, nuclear fusion begins when temperatures and pressures are high enough. This marks the birth of a new star, which will spend most of its life in the main sequence phase, where it fuses hydrogen into helium. Over time, the star will evolve, leading to various end stages depending on its mass.