Stars form from clouds of gas and dust in space through a process called stellar formation. Gravity causes these clouds to collapse, forming dense cores where nuclear fusion ignites, creating a new star. The lifespan and fate of a star depend on its mass. Low to medium mass stars like the Sun eventually become red giants and then shed their outer layers as planetary nebulae before cooling into white dwarfs. Higher mass stars undergo more dramatic transformations, ending their lives in supernova explosions that can result in black holes or neutron stars. These stellar life cycles enrich the universe with heavy elements and influence the formation of new stars and planetary systems.