diffraction (waves)
Diffraction
Diffraction is the interference or bending of waves around the corners of an obstacle or through an aperture into the region of geometrical shadow of the obstacle/aperture. Aperture, meaning a hole or an opening that primarily limits light propagated through the system; and shadow, meaning a dark area where light from a light source is blocked by an object.
1
See transverse waves for the visualization of a wave.
Huygens-Fresnel principle states that every point on a wavefront acts as a source of secondary spherical wavelets. As these wavelets spread out, they interfere with each other, forming a new wavefront. When a wave encounters an obstacle or slit, the parts of the wavefront that pass through the slit spread out into the region beyond the slit, effectively bending around the edges of the obstacle.
Don't think of diffraction as bending. Think of diffraction like this: if you have a plane wave incident on a slit, then you can think about the space in the slit as being a line of infinitely many point sources that radiate in phase.
This can be shown with
and
.
For the smaller slit, the wavefront is constrained, thus resulting in a more spread out wave. While for the larger slit, the wavefront is less constrained, thus resulting in less spreading. This can be thought as the smaller slit having "less" of the infinite point sources while the larger slit having "more" of the point sources. Diffraction of waves should not be thought as a single wave passing through a slit thus producing only a single wave, but rather many point sources (tiny waves) at the mouth of the slit which interferences and combines into one big wave.
Particles such as photons (light particles) exhibit wave-particle duality properties. Thus, when photons pass through a slit, they behave as waves, with each photon described by a probability wave function. According to Heisenberg uncertainty principle, when light is confined to pass through a narrow slit, the position is more well-defined, increasing the uncertainty in the momentum perpendicular to the direction of propagation. This causes the photons to spread out after passing through the slit.

The reason why light seemingly gets blocked by obstacles instead of wrapping around it (since it's technically a wave) unlike sound waves, as the wavelength of light is only 0.0005mm (while sound waves have wavelengths of several meters). This is particularly important as if the wavelength is much smaller than the obstacle, there will not be much, if any, diffraction. (Source)
Historical context
In 1678, Dutch physicist Christiaan Huygens proposed that light propagates as a wave through a medium, with every point on a wavefront acting as a source of secondary wavelets, expressed as \[s=vt\], where \[s\] is distance, \[v\] is speed, and \[t\] is time.

In 1801, Thomas Young verified the wave nature of light through his double-slit experiment. He observed that light passing through two closely spaced slits created an interference pattern of dark and bright fringes on a screen. This demonstrated diffraction, with light waves overlapping and interfering constructively or destructively.
For constructive interference (bright fringes), the path difference between the two waves must be an integral multiple of the wavelength (\[d\sin\theta=m\lambda\]), where \[d\] is distance between the slits, \[\theta\] is the angle of original beam direction and \[m\] is the interference order, where \[m=0,\pm1,\pm2,\dots\]).
While for destructive interference (dark fringes), the path difference must be a half-integral multiple of the wavelength (\[d\sin\theta=\frac{1}{2}m\lambda\]). (Note: The single-slit diffraction has a different formula.)