Dear student
Water is heavier that oil.So when it is poured on oil fire, it sinks to the bottom where it evaporates due to heat of fire and thus expands rapidly due to which it may push and splatter fire in all directions.
Fire due to oil can be extinguished by using dry chemical fire extinguisher.
*************
Electrical fires cannot be put out with water. If water is poured on an electrical fire, the water could conduct electricity, causing the person trying to extinguish the fire to experience an electric shock. water is a good conductor of electricity.
Regards