When a denser, oceanic plate subducts (moves under) a less dense continental plate, the plates can 'lock' and experience friction because of the opposing movement of the plates - we call this area a 'subduction zone'. Frictional stress will continue to build between the plates as they are unable to move past one another. Eventually, the subducting force of the oceanic plates overcomes the resistant force resulting in the two plates suddenly moving past one another releasing huge seismic energy in the form of seismic waves. This violently shakes the ground creating huge earthquakes.