Stars go through various stages in their life cycle, starting from the formation of a protostar, evolving into a main-sequence star, and eventually ending as a white dwarf, neutron star, or in the case of massive stars, a supernova and possibly a black hole.