Diffraction
When waves pass through a gap they spread out, this is called diffraction. The amount of diffraction depends on the size of the wavelength compared to the size of the gap.
In the first diagram the gap is several times wider than the wavelength so the wave only spreads out a little.
In the second diagram the gap is closer to the wavelength so it begins to spread out more.
In the third diagram the gap is now roughly the same size as the wavelength so it spreads out the most.