A polyfill is JavaScript that replicates CSS functionality not natively supported by browsers, ensuring compatibility.