Seismic waves travel from bedrock to the surface through the soil layers. Softer layers have lower shear-wave velocity (Vs), so the natural period of the soil column, approximated by T = 4H/Vs, becomes longer.
Near the site period, surface motion is amplified; at much higher frequencies it is attenuated. That is why two earthquakes with the same bedrock PGA can produce very different shaking at two sites.
For important projects, site-specific response analysis (SSRA) replaces generic coefficients with calculations that use the actual soil profile.