You can picture it: the heroes of our story are trapped near an erupting volcano. They need to escape, so they start running/hop in the nearest car (with keys conveniently above the sun visor)/get in a helicopter. Somehow, in the face of a wide variety of horribleness coming from the volcano, our heroes escape by the skin of their teeth and live to tell the tale.
Ah yes, if only it were so simple.
Let's start out with the important message: the best way to survive a volcano eruption is to avoid a volcanic eruption. This means that when local authorities tell you it's time to evacuate because the volcano is showing signs of eruption, then get out safely. It is much better to be out of the way well before the action begins.
Yet, for this exercise, we're thinking dramatically (and theoretically). So, if you find yourself near a volcano that starts blasting material into the sky/all over the ground, what are your chances of escaping? Some assumptions I'll use here:
The average person can run at ~8 miles per hour (~12.8 kilometers per hour) and sprint briefly up to 14 mph (22.5 km/hr). Likely you would need to run for longer than a sprint, so the lower value is the most important.
In a car, we'll assume that you can travel up to 60 mph (97 km/hr). Remember, most volcanoes doesn't have flat, paved superhighways leading away from them, so you'll be driving on dirt/curvy roads.
In a helicopter, we'll assume you can travel ~140 mph (225 km/hr) once you start traveling horizontally ... but remember, ash in the air will make visibility challenging.
Those rivers of molten rock. Sure they look fast when they're moving down channels, but are they really that fast? Lava comes in two flavors: chunky a'a and flowing pahoehoe. A'a doesn't move fast at all, maybe a few miles per hour at the most, likely much less. You're outwalking a'a. Pahoehoe can move faster, usually 6-8 mph (9-12 km/hr) on flat ground, but in the rare cases when it is really hot and moving down a steep slope, it could move as fast as ~18 mph (28 km/hr). So, most of the time, you could outrun a lava flow if you need to ... but pahoehoe lava flows tend to flow in channels, so as long as you stay out of the channel, you're likely good.
Volcanic mudflows (lahars)
Take volcanic debris like ash, mix it with readily available water from a crater lake, rainfall or melting snow and ice and then send it downhill. That will get you a lahar (or volcanic mudflow). They are thick like concrete but can move in a channel at speeds up to 30 mph (67 km/hr) depending on the steepness of the slopes, so you aren't outrunning or even outsprinting a lahar. However, they do like to stick to channels and lowlands, so if you know a lahar is coming, move uphill quickly and you can likely be safe. During the 1985 disaster at Nevado del Ruiz in Colombia, people didn't heed such advice and that's why the deathtoll topped 20,000 people. Driving uphill would save you, although walking means you don't get stuck in traffic if you're given sufficient warning. Not much ash hazard from a lahar either, so your helicopter will save you as well.
These are the nasty ones. A mix of hot volcanic gases along with volcanic ash and debris roaring down a volcano as a single, fluid mass. They can form from a tall ash cloud from a volcano collapsing or from lava domes crumbling at the top of a volcano. Once they start moving, pyroclastic flows pick up other debris or just wipe it out with temperatures anywhere from 300 to 700° C. Oh, and they're moving at least 60 mph (~96 km/hr) and up to 400 mph (~643 km/hr). So, running: no luck. Driving: most likely you're engulfed quickly. Helicopter: Maybe, but with all the ash in the air from the pyroclastic flow, you might not make it far before you engine fails. Pyroclastic flows can move down channels, but they can also jump out of channels and tear over the landscape, so your lateral maneuver won't work well either. The combination of speed and heat means pyroclastic flows win, always.
In the end, lava flows are the "safest" of the volcanic hazards, although they destroy anything that can't move out of the way. Given sufficient warning through something like a lahar early warning system, you can save yourself from death in a volcanic mudflow. However, for pyroclastic flows, which can sometimes happen unexpectedly, the best bet is to stay away from any volcano that is in the mood to create one. Otherwise, you won't have time to do any sort of escaping. Volcanoes are destructive, but with proper preparation and monitoring, we don't need to perish when they get restless.