I've been in a car that was on fire.
It was something in the engine bay, and DP was driving. There was nowhere safe to stop immediately, and as long as the car was moving the flames stayed low; every time we slowed down, the flames were leaping up visible. One chap helpfully leaned out of his window at some point to yell, "Your car's on fire!" (we'd noticed, but I appreciate his care and attention).
As we were driving towards somewhere we could pull over and deal with it, we planned our actions — I would jump out and run to the boot to get the fire extinguisher, DP would jump out and run to the front to open the bonnet.
It all went smoothly, fire was extinguished, no significant damage to the car, no injuries to anyone, no disruption or obstruction for other traffic (other than the surprise of seeing someone driving along in a burning car). If we had been in a tunnel, it's probably better for everyone that we got somewhere safe to extinguish the small fire, rather than immediately stopping the car causing an obstruction, filling the tunnel with smoke and potentially letting a major incident happen.