Sometimes waves don’t travel in a straight line, even if their speed does not change (as in the case of refraction). For example, you can hear the conversation in the next room even though you cannot see the source. This is because sound waves undergo diffraction, bending as they go through the doorway between the two rooms. Diffraction only occurs when the wavelength is close to the size of the opening or object. In the picture below Jack can hear Jill talking although they cannot see each other.
Why does sound diffract in the picture above but light does not? Sound wavelengths are typically between a few meters down to a few centimeters so they are close to the size of the doorway. Light waves have much smaller wavelengths, on the order of a few hundred nanometers (10-9 m). We only notice diffraction when the opening or object is close to the size of the wavelength, so to see diffraction of light it needs to pass through a much smaller opening than a doorway.
Scattering is a related phenomenon that occurs when a wave interacts with an object that has a resonance frequency the same as the wave frequency. The wave is first absorbed and then re-emitted in all directions (or sometimes perpendicular to the incident direction). The sky is blue because clusters of nitrogen and oxygen molecules (which make up most of the atmosphere) have resonances at the same frequency of violet light. Violet and a little blue light is scattered but since our eyes are not as sensitive to violet we see the blue. The other colors pass through. The sun looks a little more yellow than it really is because the violet/blue part of the spectrum has been removed (scattered out in other directions). Likewise sunsets are orange because when the sun is on the horizon the path the light travels to reach us passes through more atmosphere and even more violet/blue is removed.
Diffraction simulation with two openings.
Ripple tank diffraction. You are looking down onto the surface of a tray of water. Notice that the plane waves on the right
spread out into a circle on the left after passing through the small opening.
Red laser diffraction. A red laser beam is shone through several different small openings. The first is a square opening, the second a hexagonal opening. Then the laser is shone through single openings of different sizes. Finally the laser is shone through a series of double slits. Why is the light pattern complicated instead of a simple spot? What is the difference in the light pattern between the single slits and the double slits?
A diffraction grating is a piece of glass or plastic with a series of very small grooves, each of which acts like a slit. Since different colors diffract by different amounts, white light seen through a diffraction grating will spread out into its component colors as shown in this YouTube of incandescent and florescent diffraction.