They both are caused by quakes in the bottom of the ocean or moves in tectonic plates, so they are caused by giant forces moving other giant land masses.
Earthquakes are when the tectonic plates hit each other and volcanic eruptions are when the plates push up against each other and release the magma below the estates crust