White light is made up of a range of colours. These colours can be separated by splitting white light with a glass prism to obtain a spectrum. Each colour of light is refracted by different amounts, depending on its frequency - higher frequency colours are refracted more than lower frequency colours. Violet is refracted most, red light least.
A spectroscope uses a prism to display the colours which make up a source of light. This continuous spectrum is what would be seen from a source of white light.
Every element in the periodic table produces a unique line spectrum when heated, consisting of specific colours at specific wavelengths seen as thin bands.
By analysing the line spectrum (or combination of line spectra) from sources of light, eg a star, it is possible to determine the chemical elements that make it up. Alternatively, line spectra can drawn as a negative white rectangle with black bands.