How does a Spectroscope Work?

Nowadays, spectroscopes and spectrograph are electronic, diffusing and analyzing the light that passes through them to identify substances and objects. Before that, spectroscopes would use special paper made from plant pigments. When it was first invented, a prism was located inside to divide the light.