stellar evolution
Stellar evolution is the process by which a star changes over time. It begins with a cloud of gas and dust, known as a nebula, which collapses under gravity to form a protostar. As the protostar heats up, nuclear fusion ignites in its core, marking the birth of a main sequence star, where it spends most of its life.
As a star exhausts its nuclear fuel, it undergoes changes depending on its mass. Smaller stars, like our Sun, expand into red giants and eventually shed their outer layers, leaving behind a white dwarf. More massive stars may explode in a supernova, leading to the formation of neutron stars or black holes.