If cooking oil catches fire, turn off the burner and cover the pot.
Ruchin Agarwal also explains that people should never use water to put out grease fires. The water molecules sink to the bottom of the hot pan, evaporate instantly, and shoot the flames even higher.
Instead, you can put an oil fire out by cutting the heat and taking away the oxygen.