Stars are born out of clouds of hydrogen, that collapse under gravity to form dense knots of gas. This collapse continues until enough pressure builds up to heat the gas and trigger nuclear fusion. A star's brightness, temperature, color and lifetime are all determined by its initial mass. Following a fiery birth, stars lead tranquil lives as inhabitants of the galaxy. Late in a star's life, fireworks can begin anew as changes in the core heat the stars further, eject its outer layers, and cause it to pulsate.
All stars eventually burn out.
At least half of the stars in the galaxy have companion stars. These binary star systems can undergo complicated evolutionary changes as one star ages more rapidly than the companion and dies out. If the two stars are close enough together, gas will flow between them and this can trigger nova outbursts. Supernovae and novae are key forces in a grand cycle of stellar rebirth and renewal. Heavier elements cooked up in the fusion furnaces of stars are ejected back into space, serving as raw material for building new generations of stars and planets.