The rock fractures, releasing vast amounts of energy. This energy is carried outward in all directions by various seismic waves, some of which can reach the opposite side of the earth in about twenty minutes. The further the waves travel from the focus of the earthquake, the weaker they become. P-waves push and pull the underground rocks, causing structures on the surface to move back and forth. SH-waves move the rocks beneath the earth's surface from side to side, giving buildings on the surface a good shaking, often with very damaging effects.
Surface waves are long, slow waves.
The low-frequency vibrations that they induce in buildings have more effect on tall buildings than on low ones. Love waves shake things from side to side. The slowest seismic waves, Rayleigh waves, are rolling waves that make you feel as if you're struggling to keep your balance on a ship in the open ocean.