How does water extinguish fire?

The finer the water is sprayed on a fire, the faster it evaporates. As a result, it takes away energy from the flames and cools down the burning substance to such an extent that it can no longer catch fire again. Water extinguishes fire by creating a film of water over the burning substance, and thus cutting off its oxygen supply. Water has many advantages such as it is non-toxic in nature and is available in plenty. Water can be used to extinguish fire as discussed above, but this is not true in all cases of fire, for example, oil burning in a pan can be extinguished better by covering it with a lid rather than using water, burning metals would split the water chemically through the heat, and oxygen will be released which will intensify the fire further. Similarly, water cannot be used in cases where the fire has originated due to an electric fault.