How does the energy from an earthquake reach the surface of earth?

a. How does energy from an earthquake reach Earth’s surface?
b. What kind of movement is produced by each of the three types of seismic waves? c. When do P waves arrive at the surface in relation to S waves and surface waves?