Although light can appear white, it is actually made up of lots of different colours all added together. The amount of each colour is called the spectrum of the light.
You can see all the different colours using a prism like the one in the picture, which uses refraction (the bending of light) to split the light up. This works because different colours are bent by different amounts and so they come out of the prism in slightly different directions.
Some of the light from stars can be absorbed (taken away) by atoms and molecules that get in the light's way. When this happens, narrow lines can appear in the star's spectrum. The spectrum of our own Sun has hundreds of absorption lines at different colours, all due to atoms in the Sun's atmosphere.