Any object large enough to seriously be considered a planet will most likely be differentiated with the densest materials at the core and least dense materials near the surface. The smaller and less massive the object, the less differentiation is likely to have occurred, and thus perhaps the less complicated the interior structure. Although several principles are involved, the dominant one is that of inertia, or the property of material objects to resist changes in their state of motion. Other types of earthquake motion detectors use other techniques, but the original and most common method is to utilize the inertia of a mass. The greatest damage usually is from the sideways motion of the S waves, which can rip houses, tear large buildings off their foundations, and even alter the course of rivers.
P waves cause mostly up and down jostling, which typically is less damaging.