Stars are luminous balls of gas like the Sun, but hundreds of thousands of times more distant that the Sun. Star distances are measured in units of light-year or parsecs. Astronomers can rarely measure the size of a star directly; the images of all stars are blurred to about the same angular size by the Earth's atmosphere. The apparent brightness of a star gives no good idea of its distance, since stars differ greatly in their absolute brightness or luminosity. Trigonometry is used to measure the distance to nearby stars out to about 100 parsecs, by the method of trigonometric parallax.
The study of stars began with the classification of stellar spectra. Spectroscopy reveals the temperature and chemical composition of the photosphere; the Doppler shift of the spectral lines reveals the star's motion in space. Stars have a wide range in temperature, from two times cooler to ten times hotter than the Sun. The spectral features reveal that all stars contain mostly hydrogen and helium, with small quantities of heavier elements. In this respect all stars are like the Sun. Other stellar properties are deduced indirectly. For example, luminosity can be calculated given apparent brightness and distance. Size is derived from the Stefan-Boltzmann law, which specifies how much energy flows through the surface area of a star. Starting from knowledge of the mass, the power source, and the chemical composition, theorists can predict the physical conditions throughout a star. The balance between gravity pulling in and gas pressure pushing out is called hydrostatic equilibrium. Every star remains a stable sphere as long as it is steadily converting lighter elements into heavier elements by the fusion process.
Stars display a range of mass, luminosity, temperature, and chemical composition. Temperature and luminosity do not occur in any possible combination — stars are grouped into distinct types on a plot called an H-R diagram. Stars like the Sun, which shine by energy released from the fusion of hydrogen into helium, are on a track called the main sequence. The most massive stars on the main sequence are large, hot and blue; the least massive main sequence stars are small, cool, and red. There are stars much larger than the Sun — these are the giants and super giants, and stars much smaller than the Sun — these are the dwarfs. Differences among these types are conveniently displayed on the H-R diagram, which plots stellar luminosity against temperature. Stars are born, stars evolve, and stars die. The H-R diagram presents a "frozen" record of stellar evolution.
As stars form and begin to fuse hydrogen in nuclear reactions, they settle onto the main sequence: the more massive the star, the more luminous its main sequence position in the H-R diagram. Stars evolve from one form to another. They begin with pre-main-sequence configurations, settle onto the main sequence for a relatively long time to convert hydrogen into helium, and then evolve off the main sequence. Mass is the fundamental quantity that controls the evolution of any star. The more massive a star, the faster it goes through its sequence of life stages. Massive stars evolve quickly because they have strong gravity, which leads to higher pressures and higher central temperatures; they therefore consume their hydrogen faster.
Most stars, including most of those in the Sun's neighborhood, have masses like that of the Sun or even smaller. They are relatively faint and cool and they lie in the lower right part of the H-R diagram. The most massive stars are much brighter and can be seen from much farther away. These luminous stars will dominate any survey that is limited by apparent brightness. They lie in the upper part of the H-R diagram. Thus many of the stars prominent in the night sky are prominent not because they are close but because they are the very luminous "whales among the fishes," far away among legions of distant fainter stars.