A very thin floating layer of oxidized oil (helps it spread) captures incoming white light. If oil thickness fits a wavelength of light (or a whole number of them), it reinforces. If not, it cancels. You see a rainbow as changing thicknesses of the oil layer select for individual different wavelengths of light.
Now, the fun part! The rainbow extends into the ultraviolet and into the infrared, as do sky rainbows. It can't be a rainbow fallen to earth, for there is no pot of gold at its end. "8^>)
Experiment: Take a clean flat plane of glass and place upon it a slightly curved clean convex glass lens. Where the two slightly touch there is tiny circular rainbow. If you very gently press, the faint rainbow gets smaller as the distances get smaller. Two stacked clean flat plates of glass will also show broad faint color bands that dance to slight compression. Getting them apart afterward tells you about van der Waals surface interactions. NEVER try this with optical flats! They bond.