Thin film interference occurs when light waves reflected off the upper and lower boundaries of a thin film interfere with one another, resulting in a spectrum of colors. This phenomenon is responsible for the colorful patterns seen in soap bubbles and oil slicks, where varying film thickness causes constructive and destructive interference at different wavelengths.