Stellar evolution is the process by which a star undergoes a sequence of radical changes during its lifetime. Depending on the mass of the star, this lifetime ranges from only a few million years for the most massive to trillions of years for the least massive, which is considerably longer than the age of the universe.
All stars are born from collapsing clouds of gas and dust, often called nebulae or molecular clouds. Nuclear fusion powers a star for most of its life. Stars similar to our Sun gradually grow in size until they reach a red giant phase, after which the core collapses into a dense white dwarf and the outer layers are expelled as a planetary nebula. Larger stars can explode in a supernova as their cores collapse into an extremely dense neutron star or black hole. It is not clear how red dwarfs die because of their extremely long life spans, but they probably experience a gradual death in which their outer layers are expelled over time. Stellar evolution is not studied by observing the life of a single star, as most stellar changes occur too slowly to be detected, even over many centuries. Instead, astrophysicists come to understand how stars evolve by observing numerous stars at various points in their lifetime, and by simulating stellar structure using computer models.
A stellar evolutionary model is a mathematical model that can be used to compute the evolutionary phases of a star from its formation until it becomes a remnant. The mass and chemical composition of the star are used as the inputs, and the luminosity and surface temperature are the only constraints. The model formulae are based upon the physical understanding of the star, usually under the assumption of hydrostatic equilibrium.