Sunlight reaches Earth's atmosphere and is scattered in all directions by all the gases and particles in the air. Blue light is scattered more than the other colors because it travels as shorter, smaller waves. This is why we see a blue sky most of the time.
The light from the Sun looks white. But it is really made up of all the colors of the rainbow.
When white light shines through a prism, the light is separated into all its colors. A prism is a specially shaped crystal.
If you visited The Land of the Magic Windows, you learned that the light you see is just one tiny bit of all the kinds of light energy beaming around the universe--and around you!
All light travels in a straight line unless something gets in the way and does one of these things:—
Also, the surface of Earth has reflected and scattered the light. All this scattering mixes the colors together again so we see more white and less blue.
What makes a red sunset?
As the Sun gets lower in the sky, its light is passing through more of the atmosphere to reach you. Even more of the blue light is scattered, allowing the reds and yellows to pass straight through to your eyes.