How do stars form and burn out in the Universe?
Everything in the universe, including ourselves, is composed of subatomic particles that originated in stars. It is said, somewhat poetically, that we are made of stardust, and this is true.
All matter and everything around us, including ourselves, is made up of elementary particles that were once formed in stars. Sometimes some even poetically say that we are stardust, and we are.
This is because all elements heavier than hydrogen have passed through nuclear fusion in stellar cores or other explosions. Hydrogen is the basis, however, from which the first stars were formed in the beginning.
In the beginning, stars were made from hydrogen condensations, and later from a mass of different atoms, elementary particles, and stardust. The lifetime of a star, whether it becomes a black hole, a magnetar, a white dwarf, or a brown dwarf, depends on the size of the mass that was initially pulled together.
The basic premise is that the simplest chemical element, hydrogen, has been transformed into heavier elements.
Hydrogen started as clusters, thickenings, and then gravity caused those thickenings to pull together more and more, compressing them, and then stars formed.
The next generation of stars, in turn, is made not only of hydrogen but also of the remnants of previous stars, dust that already contains heavier elements. So the stars of each successive generation contain more heavy elements.
Of course, this is all relative. We're talking about percentages here; it's not as if all the stars of the next generation are made of carbon or iron. There are stars where such elements have dominated, but that doesn't mean that new stars would be made of only that.
For nuclear reactions to take place in a star, in fact for nuclear fusion to take place, both to produce high energy and then to produce heavier elements, the basic element that burns is hydrogen anyway.
The further evolution of a star, in turn, depends largely on the initial mass that is pulled together the moment a cloud of gases wandering in space starts to gather together into a star by some impulse. The greater the mass of the star, the brighter it forms, but also the faster it burns out.
The largest stars have large concentrations of mass, undergo massive fusion reactions, and live for millions of years. Big stars glow blue-white and are visible from far away, but the next stage of their evolution is most often a flare, a so-called supernova explosion.
After such an explosion, the star can either become a black hole or form into a neutron star such as a magnetar - a very compact star with a strong magnetic field.
Medium-sized stars like the Sun have existed for billions of years. The Sun is a typical medium-sized star with a total life expectancy of about eight billion years. At present, the star is estimated to be already middle-aged.
In the future, the Sun will slowly continue to burn hydrogen, become lighter and brighter, and emit more light, until at some point it becomes a red giant, inflates like a balloon, and drops its shell in an explosion, forming what is known as a planetary nebula.
The star itself will slowly become a small, bright formation, slowly fading into a white and then a black dwarf.
There are also small stars that do not gather enough mass, being much lighter than the Sun. They don't undergo fusion reactions, and the star never gets to flare properly. There is an initial glow as the star compresses and builds up heat, but beyond that, it just gently fades away to a brown dwarf - a star that doesn't shine.
In the universe, one process influences the next, supernova explosions or shed star shells create new stellar remnants which can then re-concentrate to form new stars.