Keeping pot lids nearby allows you to quickly smother a pan fire by cutting off its oxygen supply, effectively extinguishing the flames. This is a safer alternative to using water, which can cause the fire to spread.
Pan fires, especially those involving grease or oil, require a specific approach to extinguish them safely. Water should never be used on a grease fire because it will cause the oil to splatter, spreading the fire and potentially causing severe burns. A pot lid works by creating an airtight seal over the pan, depriving the fire of oxygen. Fire needs three elements to burn: heat, fuel, and oxygen. By removing the oxygen, the fire is quickly extinguished. The lid should be large enough to completely cover the pan to ensure no oxygen can reach the flames. Once the lid is in place, leave it there until the pan has completely cooled down. This prevents the fire from reigniting if any embers remain.
Always keep a properly sized lid within easy reach when cooking with oil or anything that could potentially cause a grease fire. A metal lid is preferable to a glass lid, as the glass could shatter from the heat.