Diffraction is a quantum mechanical phenomenon that occurs when a wave encounters an obstacle. As a wave passes the obstacle, it appears to bend around the object and then spread out from the contact point. In everyday life, diffraction can be seen when light hits a CD or a DVD and a familiar rainbow pattern is visible on its surface. The CD/DVD acts as a diffraction grating, which splits a light beam into its colorful components.

Double Slit

Thomas Young's famous double-slit experiment is a classic example of diffraction. In this experiment, light is shone through two extremely narrow and closely-spaced slits. One expects the pattern on a screen placed behind the slits to be two narrow bands of light. However, Young demonstrated the wave-like nature of light by showing that the two slits instead produce multiple bands of light on the screen.
This is what we would expect as light passes through the two slits. We expect the light particles to pass through the slits in a straight line (as illustrated on the top) and then hit the screen, creating two slit-shaped bands of light.
This is what we actually see on the screen. The light from the two slits somehow create multiple bands of light, beginning with a single very bright band in the center. The bands decrease in intensity as they deviate farther from the center.
Why is it that this occurs?
We can explain this phenomenon by examining how light waves interfere with each other as they propogate out from the two slits. Light waves have peaks and troughs, and when a wave at a peak meets with a wave at a trough, the two waves cancel each other out and results in a "dark spot." Like-wise, if two waves at peaks meet, the result is a bright spot. As a result of the spacing between the slits, the waves that leave the slits arrive on the screen at different times and therefore arrive at different phases. Of course, we are assuming that the original light source produces light that starts out in-phase (e.g. a laser).

Here's some of the math...

In order for the two waves to interfere constructively, their phase shift (the difference in their path lengths) must be a multiple of their wavelength. The mth bright spot occurs when the difference is m times the wavelength. Referring to the diagram and applying the Pythagorean theorem, we can calculate the difference in distances. We now set the desired phase shift equal to this difference in distances.
We now extract the L2 from under the radicals on the right.
Since ((y + d/2) / L)2 is relatively small, we can apply the binomial approximation, which states that
and in particular, if n = 1/2,
Now all that remains is to cancel terms and simplify.
This yields our final equation:

A more detailed derivation

We can extend this logic to find the relative amplitude of the light wave for a given distance y from the central bright spot. When completely constructive interference occurs, the amplitude will be doubled, and when completely destructive interference occurs, the amplitude will be zero. As shown in our previous derivation, the phase shift can be approximated by
Without loss of generality, we can scale the initial amplitude of a light ray to 1, and arrive at the following expression for the sinusoidally varying electric field:
Since one of the rays is offset, the overall amplitude due to interference is given by
Substituting our expression for the phase shift above, we have
Applying the sum-to-product formulas, we can convert this to a product
Conveniently enough, the cosine is constant with respect to theta, so all that remains is an offset sine wave with amplitude scaled by
From this, it is clear where the bright and dark areas are, and we can determine the brightness at any point.

Multiple Slits

We can generalize the the results from our double-slit calculation to three, four, or even an infinite number of slits. If we have an infinite number of slits, it acts like a single slit (do you see why?).