Earthquakes happen as a cause of plate tectonics grinding past each other, ( at Transform boundaries). Transform boundaries are two plate boundaries that move in a side to side formation causing stress between the plates, which is then released as tension which causes the plates to move and earthquakes happen. Its like rubbing two rocks together but with tension, the rock then releases thew stress and spouts sparks.