How and when should a fire extinguisher be used?

You take the hose and you click a button and the stuff flies out.