Never throw water on a cooking oil fire. Water will cause the oil to splatter and spread the fire, potentially causing serious burns and making the situation much worse.
When cooking oil ignites, it's crucial to react quickly and correctly. The high temperature of the oil, often well above the boiling point of water, creates a dangerous situation. If you were to pour water onto the burning oil, the water would instantly turn to steam. This rapid expansion of steam would violently eject the burning oil in all directions, spreading the fire and potentially causing severe burns to anyone nearby. The steam can also carry burning oil droplets, further exacerbating the situation. Instead of water, you need to smother the fire to cut off its oxygen supply. This can be done with a lid, a baking sheet, or even a fire extinguisher specifically designed for grease fires (Class B or ABC).
Always keep a properly sized lid or baking sheet nearby when cooking with oil. This allows you to quickly and safely smother a fire if one starts, preventing it from escalating. Also, ensure your fire extinguisher is readily accessible and that you know how to use it properly.