Ground motion results due to passage of elastic waves. Now there are different kinds of waves, e.g., P waves, S waves, surface waves, etc. Most of the shaking (and therefore damage) is caused by surface waves. So if you are in a deep cave or mine then the amount of shaking you might experience can be much lower than on the surface. This of course assumes that the mine or cave is not right on the fault, but some distance (10s of km) away.
Having said that, there are some situations (based on the type of earthquake and local geology) in which waves can interfere constructively to cause significant shaking even at large depths, but this only happens in certain areas and not everywhere.
In many ways elastic wave propagation is similar to acoustic or water waves. Imagine a small explosive source in a lake/pond, let's say 50 m underwater. After the explosion youthere will seebe more waves and motion'shaking' on the surface, but not much underwater unless you're extremely close to the explosive source.