I'm not very good at explaining earthquakes but I can explain subduction
Subduction is when one plate goes underneath the other it's a convergent plate boundary, this happens because the denser plate goes under as they converge (gets closer together.) if you have the ESRT (Earth Science Reference Table.) you can see the Nazca plate is getting subducted.