How does a prism work?
A prism works by slowing down the waves of light that pass through it much like the way an ocean is bluer where it is deeper. Different frequencies of light produce different colors and the prism allows light to pass through thicker sections of the prism which slows the light down enough to separate the colors as it comes out the other side of the prism.