The waves of an earthquake come in two formss.P waves (yellow) arrive fastest and compress and punch the rock.