Total and immediate evacuation is safest. Only use a fire extinguisher if the fire is very small and you know how to do it safely. If you can't put out the fire, leave immediately. Make sure the fire department is called -- even if you think the fire is out. However, before deciding to fight the fire, keep these rules in mind:
NEVER FIGHT A FIRE IF:
You don't know what is burning. If you don't know what is burning, you don't know what type of extinguisher to use. Even if you have an ABC extinguisher, there may be something in the fire which is going to explode or produce highly toxic smoke. Chances are, you will know what's burning, or at least have a pretty good idea, but if you don't, let the fire department handle it.
The fire is spreading rapidly beyond the spot where it started. The time to use an extinguisher is in the incipient, or beginning, stages of a fire. If the fire is already spreading quickly, it is best to simple evacuate the building, closing doors and windows behind you as you leave.
Your instincts tell you not to. If you are uncomfortable with the situation for any reason, just let the fire department do their job.
The final rule is to always position yourself with an exit or means of escape at your back before you attempt to use an extinguisher to put out a fire. In case the extinguisher malfunctions, or something unexpected happens, you need to be able to get out quickly, and you don't want to become trapped. Just remember, always keep an exit at your back.