To tag on to all the good advice, you should DEFINITELY keep a decent sized fire extinguisher in your car as well. I've stopped one engine fire on a car not my own from spreading by having one. Pop the hood (if it's safe to reach the latch) and unload that shit.
I suppose I should clarify. Pop it but don't fully unlatch it, then send the extinguisher up through the new gap between grille and hood so it actually gets on top of the engine. Thru the radiator and underneath is often ineffective as most fires will be sitting up on top of the engine where most wires and fuel lines exist.