What do structural engineers need to understand in order to design structures that can withstand earthquakes?

The biggest problem that structural engineers face when designing something to be "earthquake-proof" is the up and down motion created by the S waves. Seismic S waves look and behave very much like a large sheet of poster board when you wave the top of it with your hands, a massive amount of up and down motion is creating, literally lifting the building straight into the air and then dropping it back to earth. Vertical elasticity can be achieved in several ways. First of all, engineers will often make sure that buildings in earthquake zones are built with more metal than concrete, even using wood frames whenever possible. Metal and wood are flexible and ductile, which is the quality one favors in an earthquake. Anything rigid, no matter how strong, will likely shatter if shaken by the immense forces of an earthquake. Another important consideration is the terrain. The ground around a building is often softened up by the vibrations caused by both S and P waves, so engineers need to make sure the building has a solid base to stand on. It is not uncommon for some engineers to run huge beams all the way down to the bedrock, so that the structure has some backup stilts to stand on if the dirt and sand it is built atop begins to liquefy. The important thing to remember is that buildings can be fixed or replaced, but human lives cannot. Engineers aren't' worried so much about making a building usable after a quake, what matters is making sure that nothing falls on anyone.