Volcanoes are a result of plate tectonics. Tectonic plates are large portions of the Earth's crust that move independently of each other very slowly over time (think geological time scale). The boundaries where two plates converge or diverge can give rise to volcanic activity. When two plates diverge, the Earth's crust thins and can allow magma and gasses to escape into the atmosphere, thus leading to volcanic activity. When two plates converge, one plate subducts (buries itself) under the other and melts into magma, thus giving rise to volcanic activity. Unfortunately, predicting volcanic activity in advance is quite difficult. Constant monitoring of current volcanoes for seismic activity, gas emissions, and thermal changes are about the best we can do to try to avoid volcanic catastrophes.