Waves tend to travel in straight lines. However, when an obstacle is placed in a wave's path and the wave is forced to pass through a gap in the obstacle, the wave bends and spreads out on the other side of the obstacle. The bending of a wave to get past an obstacle is called diffraction.
The amount a wave spreads out or bends in response to an obstacle in its path depends on the wavelength of the wave and the size of the gap in the obstacle. Waves that have a longer wavelength can bend more than shorter waves. For example, sound has a larger wavelength than light, so it can bend more than light. This is why it's possible to hear people talking in an adjacent room even if they cannot be seen, because the sound waves of their voices can bend around the wall but the light from them does not bend sufficiently. The size of the gap in the obstacle also determines how much the wave will bend. A smaller gap causes waves to bend more than a larger gap. A loudspeaker has a small mouthpiece on one end and a large opening on the other. The size of the diffraction of sound through a loudspeaker increases with a smaller mouthpiece and can reach a wider audience.