For decades scientists have struggled to understand Earth's most sudden and destructive forces: earthquakes.