Diffraction and interference are two related phenomena typical of waves
When waves move through small holes or edges, they spread out. This phenomenon is called diffraction. This happens to all sorts of waves. The images below show what happens:
As you can observe on the images above, the smaller the gap, the more the waves spread.
A familiar example of diffraction is seen at the entrance of harbours:
Examples like the above can be visualised in many harbours around the world. It can be fun to search for some more examples like that...
The phenomenon can be easily studied using a ripple tank to produce waves in water at home.
The diffraction of sound is also very important. Longer wavelengths are diffracted more easily (because of the ratio between wavelengths and size of obstacles) and that is why when we are far from a source of sound we here more the lower pitch sounds than the higher pitches (because those have shorter wavelengths). This is also an important consideration in the design of speakers: the tweeters (that play the high pitch/short wavelength sounds) are smaller to make sure diffraction occurs and the sound spreads as it leaves the speaker. There are good images on the site hyperphysics that illustrate that.
Interference
All types of waves interfere, that is, when they overlap they can add up to a higher crests (constructive interference) or reduce or even completely cancel the crest (destructive interference). It depends on the way they meet:
Diffraction of light
This phenomenon has been used as evidence that light is a wave for centuries. Patterns of interference can be visualised using phet animations, where light moves through different holes and slits, of variable sizes!
The diffraction of light has many applications because of the interference that occur when light waves are superposed (overlapped) , e.g., they reinforce each other or they cancel each other, to different extents. Interference is not part of the IGCSE syllabus, but you can learn it about it here if you want, for fun. It explains all colours are produced on the backs of CD's and other diffracting surfaces and also how holograms are produced.
For diffraction to happen to light , the holes must be of the same order of magnitude as the wavelength of light , or whatever EM radiation. The diffraction of X-rays, for instance, is very important for determining the structures of all sorts of crystals: salts, acids (like DNA) and eve viruses. X-rays are used for crystallography, instead of light, because their wavelengths (smaller than for light)are close to the bond lengths of atoms and molecules in crystals. The information is obtained from the interference patterns that result from diffraction and the overlapping of the refracted waves. The image below shows a screenshot from a Phet animation of light diffraction from a regular arrangement of points, similar to a crystal structure:
In the case of white light, interference can enhance some wavelengths and eliminate others, producing in this way a pattern of colours.
When diffraction happens, lots of different waves are produces and they can interfere , so that many colours are seen.
A typical way of producing diffraction is to send light through a narrow hole or slit. After light spreads by going through the hole (or slit), the new waves produced interfere with each other producing very intense regions (were the interference is constructive) and empty or less intense regions when the interference is destructive.
A CD has tiny holes made following a spiral track. Those are small enough to diffract light and the colours seen are the result of the interference between the diffracted waves. Some wavelengths (colours) are reinforced and others disappear, so that a colour pattern is produced.
Light waves can also interfere and produce colours by other means (without diffraction).
That is why we see colours in oil that leaks over a puddle of water . The water layer over the water s very thin so light that reflect from the top and the bottom of this layer interfere with each other (in this case there is no diffraction, only interference).
same phenomenon is responsible fro the colours in soap bubbles and soap films. As the bubble moves and change width, the colours also change. This is called thin-film interference. My video (below) shows the colours produced by a soap film :
Although these colour patterns produced y interference may look like rainbows, it is important to understand that the colours in rainbows are produced by a different phenomenon : refraction.
In fact, that are 15 physical and chemical mechanisms that produce colours. The ones more related to this course are explained here.