Almost all of the points of light visible in the Earth's sky are stars. Prehistoric cultures saw mythological patterns in them (constellations). The Old Testament envisioned them as pinpricks in a piece of cloth, letting in light from heaven. Later, Ptolemy developed a model of the universe with Earth at its center, the sun, moon, and planets in various orbits, and the stars at the outer edge, affixed to a spherical shell, the firmament.

As science progressed, it was eventually discovered that the stars we can see are not in fact pinpricks, but objects very similar to our own sun, dimmer only because they are so ludicrously far away. Like the sun, they are balls of gas that glow with unimaginable brightness and heat.

i.

For complex cosmological reasons, the universe has been clumpy almost from the get go about 13 billion years ago. Gravity, being the only one of the four fundamental forces to act on all matter equally, has a tendency to make gigantic clumpy things clumpier. The universe, therefore, has been getting clumpier for quite some time, and will continue to do so. One of the outcomes of this is the formation of stars.

A star begins life as a nebula, a diffuse cloud of hydrogen gas (and sometimes other gaseous elements, and sometimes a bit of dust) as large as or larger than the solar system. Over time, the cloud becomes clumpier: specifically, a very large, very dense clump develops in the center, drawing in more and more of the nebula.* Because the individual bits of gas retain their momentum, the clump rotates (think of an ice skater pulling in their arms as they go into a spin). Eventually, if the nebula was large enough to begin with, the gas at the bottom of the nebula -- at the center -- has a lot on top of it, and is compressed with a tremendous amount of force; the very atoms are packed so closely that they begin to undergo fusion: they meld with one another to form helium. This releases a lot of energy -- a lot of heat, and a lot of light. It also releases pressure outward. The nebula stops contracting. It is now a main sequence star.

ii.

The remainder of the star's existence will be a tug of war between gravity, which wants to crush the star into a tiny tiny ball, and the fusion going on inside, which wants to explode the star and send pieces of it hurtling through the universe. In small stars, red dwarfs, this plays out over a tremendously long period of time; despite having less hydrogen than large stars, the interior is not subject to as much pressure, and so fusion is less intense and the hydrogen is used up very slowly indeed (the lifespan of a red dwarf is orders of magnitude longer than the total amount of time elapsed in the universe so far). This is evidenced by the color: a star glowing red is not as hot as one glowing white (nor as bright; red dwarfs are undetectable to the naked eye). As a red dwarf exhausts its hydrogen, it releases less and less energy, becomes dimmer and dimmer. As it releases less energy, there is less to oppose gravity, and it becomes a bit smaller. Fade to black. (Black dwarf, to be precise.)

The sun is a mass of incandescent gas. It is a yellow dwarf, a mid-sized star, with a lifespan on the order of 10 billion years. Near the end of that time (and this applies to all other mid-sized stars), its outer layers, the only remaining hydrogen, will be heated by the now much hotter core and drift outward (it will subsume Mercury and its heat will boil away the Earth's oceans). Having a much larger surface area and only a slightly higher temperature, the sun's color will darken to red. It will be a red giant. Eventually, it will subsume Venus and Earth, before the outer layers drift away as a planetary nebula.

The core that remains, an ultradense hunk of degenerate matter the size of the Earth, will be a white dwarf. It will be hot -- hot enough to shine white -- but with no fusion to provide additional heat, will gradually (over absurdly long stretches of time) cool and dim into a black dwarf.

iii.

Large stars have much shorter lives (their centers packed more tightly, they are hotter and burn through themselves quickly) and much more exciting deaths. After using all their fuel -- that means expending the hydrogen, helium, etc., until only unfusable iron remains -- one will suddenly explode in a supernova. All elements heavier than iron are produced only in supernovae.

The core that remains will collapse -- the pressure of gravity, uncompensated by fusion, will overcome the outward force of the electron shells of the constituent atoms. The electrons will be forced into the nuclei where they will collide with the protons to form neutrons. The star will be a solid blob of neutrons. It will, in effect, be a single gigantic nucleus the size of a city. It will be a neutron star, spinning many times a second. It will be a pulsar.

Or it won't. If it's too big, if it's too heavy, the gravitational field will smash the very neutrons. With nothing to stop it the star will collapse further and further, and as it collapses it will grow smaller and smaller -- and its gravity will therefore become stronger and stronger, in a vicious cycle. Eventually (almost instantaneously, in fact) the pull will be so strong that even light will be unable to escape. The star will have become that most bizarre of stellar phenomena, a black hole.


* Nebulas with a lot of heavier elements (which in practice usually means nebulas created by supernovas) can form planets as well as stars; these begin as diffuse satellite clumps.)