How are tectonic plates involved in causing earthquakes and volcanoes?

the tectonic plates shake under the earth causing earthquakes