1.A luminous, hot solid, or dense, hot gas, emits light of all wavelengths and so produces a continuous spectrum of radiation.2.A low density hot gas emits light, the spectrum of which consists of discreet, bright lines. This emission spectrum is indicative of the chemical composition of the gas.3.A cool, low pressure gas absorbs light at specific wavelengths or colors. This occurs in all normal stars. This absorption spectrum reveals the presence of chemical elements.
Spreading the light of a star through a spectroscope reveals the chemical composition of that star, among other things. Franhoufer first saw dark lines in the spectrum of the Sun. In the nineteenth century, Gustav Kirchoff developed three laws which describe the different types of spectrathat we see, and explains the source of each type.