Cavity varnish is a resin solution applied to prepared cavity walls that forms a protective film barrier between restorations and dentin. It is composed of natural or synthetic resins dissolved in solvents like alcohol or acetone, and sometimes contains fluorides or other agents. Cavity varnish is supplied in bottles and applied in thin layers to reduce sensitivity, seal dentin, and protect restorations from corrosion or dehydration. Proper application involves allowing layers to dry before adding more.