When a wave hits an obstacle it does not simply go straight past, it bends round the obstacle. The same type of effect occurs at a hole - the waves spread out the other side of the hole. This phenomenon is known as diffraction.
The effects of diffraction are much more noticeable if the size of the obstacle is small (a few wavelengths across), while a given size of obstacle will diffract a wave of long wavelength more than a shorter one.
One of the most powerful pieces of evidence for light being some form of wave motion is that it also shows diffraction. The problem with light, and that which led Newton to reject the wave theory is that the wavelength is very small and therefore diffraction effects are hard to observe. You can observe the diffraction of light, however, if you know just where to look. The coloured rings round a street light in frosty weather, the coloured bands viewed by reflection from a CD and the spreading of light round your eyelashes are all diffraction effects.