Volcanoes and earthquakes go hand in hand, however they can exist for different reasons. It is worthwhile to look at the connection between the two.
Volcano caused earthquakes
Normally, before a volcano erupts, it produces a magma pocket of super heated and fluid rock beneath the surface of the earth. This magma can be thousands of degrees in temperature. Under normal conditions, it is contained within rock that has a higher melting point. However, the containing rock is still subject to melting, and it also has cracks or fissures that can allow the magma to flow upward.
Since the liquid rock is under pressure, it moves toward the surface, where the pressure is not as great. As this happens, the magma can and does melt rock and forces other rocks apart. The result is an earthquake. Forces that cause rocks apart or that cause solid material to drop will almost always cause measurable seismic disturbances.
Thus, the movement and action of the magma can cause measurable earthquakes that can often be easily be felt, long before the eruption occurs. This is how agencies such as the United States Geologic Survey can say that volcanoes are about to erupt. They can't say when, but they often know that the blast is immanent.
Earthquake caused eruptions
It can be seen and easily explained that volcanoes can cause earthquakes, and usually do. However, it can work the other way, too. A volcano is like a gigantic bottle or can of pop that has been shaken, with the contents trying hard to get out. The only thing preventing this is a 'cork' of solid rock above it, containing the fury beneath.
An earthquake at this point can dislodge the cork and set the contents free. This is what occurred during the 1980 eruption of Mount St. Helens. A quake dislodged so much rock and dirt that the magma had a clear and easy path to the surface. As it was under tremendous pressure, the eruption was catastrophic. No longer contained, the eruption blasted though the ground and destroyed a huge amount of growing forest.
Time lapse photography has shown that the mountain face scarcely started to fall before the eruption occurred. Many people have seen that footage, though they may not have keyed on the significance of the quake in the events that followed.
There is a very definite connection between earthquakes and volcanoes, and it works both ways; cause and result. The quakes are still one of the best indicators of an immanent eruption, though not foolproof. The biggest problem is that not all places are monitored. By the time distant stations get the information, it could be too late.
US department of forestry
Volcanoes National Park
Mount St. Helens National Volcanic Monument
Special thanks to Lassen National Park