A spectrometer is any instrument used to measure the wavelengths and intensities of a physical characteristic over a given range, i.e. spectrum. The property being measured is usually intensity of light, but other variables like polarization can also be measured. Technically, a spectrometer can function over any range of light, but most operate in a particular region of the electromagnetic spectrum.
The three most common types of spectrometers are mass spectrometers, which measure the mass-to-charge ratio; NMR spectrometers, which measure the variation of nuclear resonant frequencies; and optical spectrometers, which measure the change in the absorption and emission of light with wavelength.
Spectrometers are used in a variety of disciplines including physics, materials science, chemistry, biochemistry, pharmacology, chemical engineering, and molecular biology. They are used in astronomy to analyze the chemical composition of stars and planets and they also gather data on the origin of the universe.