When we see the Sun at sunrise or sunset, when it is low in the sky, it may appear yellow, orange, or red. But that is only because its short-wavelength colors (green, blue, violet) are scattered out by the Earth's atmosphere, much like small waves are dispersed by big rocks along the shore. Hence only the reds, yellows, and oranges get through the thick atmosphere to our eyes.
When the Sun is high in the sky, the shorter waves, primarily the blue, strike air molecues in the upper atmosphere and bounce around and scatter. Hence explaining why the sky looks blue.
A clear cloudless day-time sky is blue because molecules in the air scatter blue light from the sun more than they scatter red light. When we look towards the sun at sunset, we see red and orange colours because the blue light has been scattered out and away from the line of sight.
The white light from the sun is a mixture of all colours of the rainbow. This was demonstrated by Isaac Newton, who used a prism to separate the different colours and so form a spectrum. The colours of light are distinguished by their different wavelengths. The visible part of the spectrum ranges from red light with a wavelength of about 720 nm, to violet with a wavelength of about 380 nm, with orange, yellow, green, blue and indigo between. The three different types of colour receptors in the retina of the human eye respond most strongly to red, green and blue wavelengths, giving us our colour vision.