Why do sunsets look like that?

During the day, the sky is blue and the sun appears a bright yellow. As the sun sets, it dims and reddens while the sky turns pink and orange. What causes that? You may have heard before that the sky’s blue color is due to something called Rayleigh scattering. As it turns out, the way…