How do seismic waves affect buildings?
Well, they affect the foundations of buildings and cause them to topple.
Seismic waves have a particular frequency in which they travel at through the ground. In every building, there is a natural frequency of swaying depending on the shape, height and material of it. When the seismic wave's frequency corresponds or is similar to the building's natural frequency, resonance occurs and the building will sway very wildly. (Energy gets transferred to the building at great efficiencies.)
In general, even if the frequencies do not correspond, the mere presence of the waves may already cause buildings with weak foundations to be destroyed, simply due to their inability to handle the stress at the bottom.
transitional faults can move parts of the buildings in opposite directions. The Northridge fault caused one part of bridge to move 10 feet from the south side of the bridge. The 1906 San Francisco fault was a transitional fault.