A spectroscope is a device that separates light into its individual colors in a rainbow-like band called a spectrum. The spectrum of each chemical element looks slightly different, so scientists use spectroscopes to see what elements make up the sun and stars. Try making your own spectroscope and turn any light in your house into a rainbow!
You now have a working spectroscope! Use it to look at several different types of light: a normal incandescent light bulb, fluorescent light, LED light, a glow stick, even sunlight. (But be very careful - do NOT look directly at the sun through your spectroscope!) You can also look at the flame of a match or candle, if you have someone else hold it for you.
Do you see a difference in each light's spectra? Incandescent light bulbs and sunlight will produce a continuous spectrum, where all the colors merge smoothly into each other. (Stars actually emit a dark-line spectrum, which has the colors broken up by dark lines. Only very precise spectroscopes can see the dark lines, however, so the sun looks like a continuous spectrum.) A fluorescent light will produce a bright-line spectrum, which has bright lines separated by dark spaces. Try drawing each spectrum with colored pencils and comparing them. You can also try varying the width of the slit - does that change the appearance of the spectrum?
Each of the colors that light is made of has its own wavelength, which reflects and refracts at its own angle, different from all the other colors. When light hits the diffraction grating, it is reflected back onto the wall of the spectroscope. All the little grooves on the grating separate the colors so they reflect at their different angles. The beam of light hits the diffraction grating at one angle, but since each color bends back at a different angle, they are spread out along the spectroscope wall, allowing you to see them.