While it is not really possible to prevent a volcanic eruption, you may be able to survive one. With some planning ahead, you might just make it through the eruption and nuclear winter that would follow.
The first thing to do is have a shelter. You’ll need to get as far away from the volcano as possible because of lava flow, vents, and earthquakes. Also, the shelter should not be anywhere near a fault line as earthquakes are a side effect of a massive eruption. Make sure that wherever and whatever your shelter is, you have the ability to recycle and recirculate air. There really is no telling how long you would be stuck there (think District 13 for those Hunger Games fans out there).
Once you have a shelter picked out and ready, you’ll need to stock up on water and non-perishable food. Make sure that you and anyone you take in could be self-sustained for at least a few months. Remember, even if you want to venture out in the aftermath to search for food, the plants and animals (if even still alive) will be toxic.
You’ll also need to have some basic survival gear like goggles and filter masks to protect you from the ash. Make sure to have plenty of towels so that you can dampen them and stuff them anywhere air might get in. The damp towels will work as a sort of filter for the outside air making sure that the ash does not inundate your shelter. Lastly, until the ash clears it will be very much like a nuclear winter. Make sure you have plenty of warm clothes and blankets. If for any reason you go outside, have an outer layer you can strip off before you reenter your shelter. Once the volcanic ash is in, you won’t be able to get rid of it.
It may not be a perfect solution, but if you have the above in place, you have a better chance of surviving a volcanic eruption than most. Is there anything else you can think of that you would need?