As many have said, a car fire can be a dangerous thing. Those dangers have been pretty well covered in others posts.

Rubbers, plastics and other synthetics tend to burn less completely than ordinary combustibles. The thicker, darker smoke is not only much more toxic but it is also more explosive than cleaner burning fuels. Smoke from a typical engine compartment fire could have a ignition temperature similar to propane, this is why it is not uncommon for the fire to "explode" when the hood is opened completely.

So, the best advice is what a lot have been saying: pull the hood release and get away from the car and the smoke. Hood release usually fail in a car fire, and pulling it before you exit the car will make it much easier for the fire department to open the hood.

Fire extinguishers are just about useless in car fires that are well involved. They work well for small fires that you can easily access, when used correctly. Often when we get on scene, we will find multiple used fire extinguishers laying around the front of a car that had no effect on the outcome.
_________________________
"Trust in God --and press-check. You cannot ignore danger and call it faith." -Duke