If we speak about the nature of fire, we must always keep in mind that it is the chemical reaction that is possible in case when fuel and oxygen are brought together with the heat, sufficient for the combustion process. This dangerous combination is able to cause fire. If you remove one of these dangerous components, the process of combustion is no more possible and fire ends. This is the basic principle for the competent fire fighting, as well as for the right fire extinguisher choice.
The fires are subdivided into 4 main classes: A, B, C or D (on the basis of the nature of combustible or inflammable materials that caused the fire in this or that case).
As for electrical fires, they are mostly referred to the class C, as they include the combustion of electrical equipment, such as appliances, wiring, circuit breakers and outlets, though they can also be of A, B or D type.
So, if you know the type of fire possible in these or those premises, it is for sure easier for you to choose the appropriate fire extinguisher.