A star is a luminous sphere of plasma held together by its own gravity. The nearest star to Earth is the Sun. Other stars are visible to the naked eye from Earth on clear nights, and many more can be seen with binoculars or telescopes. Stars are categorized according to their spectral types—the characteristics of their light—into various spectral classes indicated by letters. The brightest stars are of spectral type O, while the faintest visible to the unaided eye are of type M.
Stars form in clouds of dust and gas called nebulae. As a star condenses out of its natal nebula, it releases gravitational potential energy that heats up its interior, causing it to shine with thermal radiation. This release of energy causes the star’s interior pressure to increase until it reaches equilibrium with the outwards force exerted by the star’s gravity, at which point the star becomes stable. Once a star has achieved hydrostatic equilibrium, nuclear fusion reactions occur in its core region, releasing additional energy that prevents further gravitational collapse and allows the star to radiate this energy away into space as electromagnetic radiation (light).
The lifetime of a typical star is determined by its mass: more massive stars burn through their fuel faster and thus live shorter lives than less massive stars. For example, an O-type main-sequence star—that is, a hot young blue-white star like our Sun—burns through its hydrogen fuel in just 10 million years or so before expanding into a red giant and eventually cooling off as a white dwarf over billions or even trillions of years. In contrast, an M-type main-sequence star—that is, a small cool red dwarf like Proxima Centauri—may take tens of billions of years to exhaust its hydrogen fuel supply and will end its life as a black dwarf only after trillions upon trillions of years have passed (assuming no cataclysmic events intervene). Thus we see that all stars ultimately pass through several distinct evolutionary stages during their lifetimes: birth (formation from interstellar gas & dust), main sequence “life” (hydrogen burning), death (exhaustion of fuel leading to expansion & cooling), and final demise (cooling into obscurity).