A spectroscope uses a prism (or a diffraction grating) to disperse light into its component wavelengths. By analyzing the resulting spectrum, scientists can identify the specific wavelengths of light emitted by a substance, helping to determine its composition.