The sky is blue as a result of Rayleigh scattering. Rayleigh scattering represents the high frequency of gas molecules hitting and absorbing blue light. As the horizon turns pale, the blue light has to pass through more air to reach the human eye, which causes the horizon to appear white.
The Earth's atmosphere contains a mixture of gases, as well as things like dust and drops of water. It is also constantly bombarded by light. Dust and water particles are much larger than a wavelength of light, meaning that any light hitting them bounces away. Gas molecules, on the other hand, are smaller than light waves. These molecules absorb light and re-emit it in different directions. Further, gas molecules have an easier time absorbing short wavelengths of light. So, most light on the red end of the spectrum passes through the atmosphere while gas molecules absorb the shorter waves and scatter them back as visible blue light.
Longer-wavelength light passes through the atmosphere easily. Colors like red, yellow and orange are not affected by the air as much, and the frequency of absorbed light is low. Shorter-wavelength light is scattered by gas, sending it in different directions. The scattered blue light is seen by the human eye as coming from every direction.