I know there's been plenty of times in the past 20 odd years of growing indoors when I have been worried about my house going up in flames due to something going wrong with electricity or over heating ect.
The best way to use a fire extinguisher is to remember this P A S S..
Pull the Pin at the top of the extinguisher. The pin releases a locking mechanism and will allow you to discharge the extinguisher.
Aim at the base of the fire, not the flames. This is important - in order to put out the fire, you must extinguish the fuel.
Squeeze the lever slowly. This will release the extinguishing agent in the extinguisher. If the handle is released, the discharge will stop.
Sweep from side to side. Using a sweeping motion, move the fire extinguisher back and forth until the fire is completely out. Operate the extinguisher from a safe distance, several feet away, and then move towards the fire once it starts to diminish. Be sure to read the instructions on your fire extinguisher - different fire extinguishers recommend operating them from different distances. Remember: Aim at the base of the fire, not at the flames!!!!
Take a look at this and get familiar with different types of extinguishers there are, you don't want to use the wrong one it will only make things worse and or possibly fatal.
If you don't already have one set up in your grow room (not inside tent or cupboard) go buy a smoke detector too. Spending $100 odd on Fire Safety is worth it, especially if you have a family. Even if you don't grow inside you should still have a working Fire Plan active in case of a house fire.
I keep my extinguisher right next to my tent, its a small White Banned B.E one which is Dry Powder and can be used for both oil/petrol fires and electric fires..
Due to how many grows are actually going on in Australia at any one time its still very rare for a grow room related fire but still i would rather be prepared then to lose every thing i have. Grow well and be safe..Grow safe and be well.