Spectroscopy is the study of light as a function of length of the wave that has been emitted, reflected or shone through a solid, liquid, or gas. To be analyzed the chemical is heated, because hot things glow and each chemical glows differently. The various wavelengths of the glow make a color spectrum that differs in some detail from other chemicals. Spectroscopy separates and measures the brightness of the different wavelengths. It can identify the chemicals in a mixture, and determine some other things, such as how hot the thing is.