A star is a localised aggregation of matter which, by gravitational compression, gets heated to a temperature at which hydrogen-to-helium fusion takes place.

Stars are suns and the sun is a star. Stars only look small and faint because they are incredibly far away. Unless there is an undiscovered dead star closer, the nearest star to Earth's sun is Proxima Centauri, which is just over 4 light-years distant.[1]

Without including their corpses remnants (see further down) stars present very large variations on their properties, especially luminosity where among those whose properties are better known we've from R136a1 that really puts the Sun to shame and not only is a hydrogen-guzzler, but also can be seen even being located in other galaxy to 2MASS J0523-1403 outshined by our Daystar, miserly burning its little hydrogen, and so faint that large telescopes are needed to spot it despite its proximity to us -the luminosity ratio between those two extremes is almost 70 billion-. Sizes vary between the humongous UY Scuti, large enough was it on the Sun's place to reach midway between Jupiter and Saturn and EBLM J0555-57 Ab, that is as large as Saturn, and finally masses vary between the almost three hundred solar masses of the already mentioned R136a1 to VB 10, with less than 1/10th of the Sun's mass. Finally (surface!) temperatures show a less extreme variation and range between around the two hundred thousand K of certain evolved high-mass stars and the "just" around two thousand K of those three small ones.

Stars form out of gigantic, rarefied interstellar clouds of gas and dust. Such a cloud will eventually collapse in on itself due to self-gravitation. As the material falls into the center, it heats up, eventually getting so hot that it glows. We now have a protostar.

If the collapsing cloud wasn't very massive -- less than about 8% of the mass of the sun -- the protostar stage will be the end of the line. The little lump of gas in the middle will be a brown dwarf, which will slowly cool off.

If the collapsing cloud was more massive than this, however, the core at the center of the protostar will get hot enough and pressurized enough that nuclear fusion of light hydrogen will commence. The protostar is now an actual star. It will take some time for all the excess heat generated during the protostar phase to be shed, and for the star to settle down to the brightness it will have for most of its lifetime (called the "main sequence"). This stage between the end of the protostar phase and the beginning of the main sequence is sometimes called the T Tauri stage, named after the 3rd previously-unnamed variable star to be discovered in the constellation of Taurus. Note that at the peak of the protostar stage, a star will be brighter than it will become in the main sequence.

The chemical makeup of the star is determined entirely by the chemical makeup of the cloud it collapsed out of. Any planets that exist around the star will also have formed out of the same cloud, and will have a similar distribution of elements. Thus, if the star formed out of a cloud that was lying around when the galaxy was new, before the interstellar medium had become enriched with metals, the star and its planets will also be metal-poor.

Note that, contrarily to what one could expect, the more massive a star is the faster it will fuse its available hydrogen as larger stellar masses mean higher internal densities and temperatures, which translates to (much) faster rates of nuclear reactions and thus to higher luminosities than smaller ones. The already mentioned R136a1, as well as other less luminous stars but still so much that by far outshine the Sun, guzzle their fuel reserves so fast that they will be long gone when the latter exhausts its hydrogen supply, while the tiny stars of above, precariously fusing their little available nuclear fuel, will still be shining -and without having changed very much since today- when Sol is just a long-gone memory and will be among the last ones illuminating the Universe.

Stars are incredibly hot and shine because nuclear reactions in their cores keep heating them. Stars eventually "die" by either exploding as a supernova or merely cooling to a point where they cannot support nuclear reactions. The ultimate fate of stars can be black holes, neutron stars, white (or black) dwarf stars.

Before a star actually dies, it goes through a series of death throes. In nearly all cases, this involves some form of a red giant: the star expands, usually over the course of up to several hundred million years, to many times its main sequence diameter. In the process, its outer layers cool and thus become redder. The expansion occurs because, when the core runs out of hydrogen, its outward radiative pressure ceases and a shell of material around the core collapses down onto it. This shell then gets hot and high-pressure enough to start burning hydrogen into helium itself. Due to its greater surface area, the hydrogen-burning shell actually produces more outward radiation pressure than the core did during the star's main sequence lifetime. The red giant phase can last for upwards of several million years, if the star started out small enough.
Once the inert stellar core reaches a temperature of around 108K and a density high enough (103kg cm-3), helium fusion into carbon and oxygen ensues. For stars with a similar mass to the Sun, this process ("helium flash") is explosive liberating during a few seconds as much energy as an entire galaxy (however none of that energy arrives to the surface and is instead used to re-expand the stellar core). The star contracts and becomes a smaller, less luminous star to expand again as red giant once core helium is exhausted to finally expel its outer layers forming a planetary nebula, and leaving behind its high-density, inert, core: a white dwarf (see below). Sun-like stars do not fuse elements beyond helium as they're unable to produce the temperatures and pressures required.

More massive stars have an even more lively old age. Stars of at least 9 solar masses, and even a bit less, are able to burn (fuse) in their cores heavier elements than helium, each burning process producing less and less energy, thus being used up faster and faster until they arrive to iron, an element whose fusion requires energy. The star then collapses and explodes as a supernova, with the energy of the explosion - similar to that of a galaxy — being able to fuse iron and produce heavier elements. Meanwhile from the outside things are also quite lively: depending of their mass, they become red supergiants (basically red giants on steroids)[note 1] and may explode in that stage, or instead extensive mass loss may cause them to loop back to higher surface temperatures and smaller sizes before supernova time.

The most massive stars will not go red supergiant and will instead become hotter-than-red-supergiants hypergiant stars (or will even skip this phase) before contracting due to high mass loss to much smaller radius and much higher surface temperatures, to finally suffer core collapse directly to a black hole and explode as a hypernova (for the most massive of them, direct collapse to a black hole with no hypernova is also predicted as well as the possibility of them simply blowing up apart leaving no remnant). The small, dim red dwarf stars will be almost entirely helium by the time they deplete their hydrogen fuel (many times the current age of the Universe), so there will be no hydrogen to form a hydrogen-burning shell; instead, they will heat up without expanding, becoming a hypothetical blue dwarf, followed by contraction into a white dwarf.

Note that in all the above cases the presence of a close companion star may royally mess up things (just ask Algol)

A black hole is an astronomical body so dense that the escape velocity[note 2] is greater than the speed of light. At the center is the singularity, which is infinitely dense and completely ignores the laws of physics.

A neutron star is a compact object that is created in the core of a massive star during a supernova explosion.[2] As their name suggests, neutron stars are composed almost entirely of neutrons. Though they are dead stars, they are still very hot. They are extraordinarily smaller than the original star from which they originated, with a radius of about 12 km. In contrast, the Sun's radius is about 60,000 times that. They typically have a mass between 1.35 and about 2.1 solar masses.[note 3]
As a result of its extreme density, a typical neutron star has a surface gravity of over a hundred billion G's and an escape velocity of about 1/3rd the speed of light. A single teaspoon of its interior would weigh at least two billion tons at the surface of the Earth. Any object falling toward a neutron star would be torn apart by tidal forces before it impacted the surface.

Scientists have calculated that neutron clusters in the neutron star's outer crust may be composted of some of the toughest material in the universe, with names like nuclear gnocchi, spaghetti, waffles, lasagna, defects, antispaghetti and antignocchi.[3][4]

Some neutron stars are known to emit radio waves that pulse on and off. This occurs if a significant proportion of the magnetic moments of the component neutrons are aligned. [5] These neutron stars are called pulsars. The "off" and "on" emission that is characteristic of pulsars is due to the star's rotation. The radio waves only escape from the North and South magnetic poles of the neutron star. If the spin axis is tilted with respect to the magnetic poles, the escaping radio waves sweep around like the light beam from a lighthouse. On Earth, radio astronomers pick up the radio waves only when the beam sweeps across the range of the Earth. The first pulsar was detected in 1967 and for a short time the regular signal was thought to be evidence of extraterrestrial life (the pulsar PSR B1919+21 was originally nicknamed LGM-1 for "little green men").

A white dwarf is a small star composed mostly of electron-degenerate matter. Because a white dwarf's mass is comparable to that of the Sun and its volume is comparable to that of the Earth, it is very dense, though nowhere near as dense as a neutron star. White dwarfs are faint in comparison to other stars because they're really tiny; although the matter within them no longer undergoes fusion reactions, and all their luminosity comes from the emission of stored heat, they have a lot of stored heat. Their surface temperatures are actually quite high by stellar standards. Over time, they become dimmer and give off less energy, turning into a theoretical "black dwarf". Because no white dwarfs are older than the universe itself, even the oldest white dwarfs still radiate at temperatures of a few thousand kelvins, and no black dwarfs are thought to exist yet. Interestingly, our own Sun will more than likely become a white dwarf due to the fact that it is too small to become a black hole or neutron star.

If a white dwarf is part of a binary star system, and its companion star expands into a red giant near the end of its lifetime, the white dwarf can accrete material from the other star's outer atmosphere (forming a "mass-exchange binary" system). This drawn-in material will be subjected to the white dwarf's surface gravity, on the order of a hundred thousand G's. When enough material accumulates, the accreted material can get hot enough and pressurized enough to undergo nuclear fusion, resulting in a nova outburst. If the white dwarf accumulates so much material that its mass exceeds 1.44 Solar masses, it will collapse under its own weight and explode, creating a spectacular Type 1a Supernova.

Brown dwarfs can be easily confused with other stellar objects. Fortunately, simple tests exist to determine whether it really is a brown dwarf.

Lithium is generally present in brown dwarfs, but not in low-mass stars. Stars, which achieve the high temperature necessary for fusing hydrogen, rapidly deplete their lithium when Lithium-7 and a proton collide, producing two Helium-4 nuclei. The temperature necessary for this reaction is just below the temperature necessary for hydrogen fusion. Convection in low-mass stars ensures that lithium in the whole volume of the star is depleted. Therefore, the presence of the lithium spectral line in a candidate brown dwarf's spectrum is a strong indicator that it is indeed substellar. This test can be flawed. Lithium can be seen in very young stars, as they have not had a chance to burn it off. Our sun also contains lithium in its outer atmosphere, as it is not hot enough for the process to take place. In addition, brown dwarfs at the high end of their mass range can be hot enough to deplete their lithium when they are young. Dwarfs of mass greater than 65 can burn off their lithium by the time they are half a billion years old.

Unlike stars, older brown dwarfs are sometimes cool enough that over very long periods of time their atmospheres can gather observable quantities of methane (an example of a brown dwarf confirmed in this way is Gliese 229B). Main sequence stars cool, but eventually reach a minimum luminosity which they can sustain through steady fusion. This varies from star to star, but is generally at least 0.01% the luminosity of our Sun. Brown dwarfs cool and darken steadily over their lifetimes: sufficiently old brown dwarfs will be too faint to be detectable.

Brown dwarfs can be confused with gas giants like Jupiter, but have a much higher density.

About all brown dwarfs, no matter what their mass, are about the size of Jupiter. [6]