The general mechanism of an air compressor is a Water Lubricated Air Compressor piston or rotary element (e.g. rotary screw or vane) that draws in air flow, which is compressed right into a storage container. Naturally, because the piston or rotary component needs to move regularly and smoothly because of this to work, it generally needs to be lubricated.
In a lubricated air compressor, there is lubricating oil which keeps the piston or rotary element running well without damaging the system. The lubricant also really helps to dissipate warmth and maintain air compression efficiency.
Oil-free air compressors also use a piston or rotary element, however they get around the lubrication problem by coating the compression element with a pre-lubricating material like Teflon. Some oil-free compressors could also use water in place of oil for the lubricating and cooling process. These alternate materials secure the pump and allow the mechanism to go smoothly with no need for any oil-based or synthetic lubrication.