In
geotechnical engineering,
soil compaction is the process in which a stress applied to a soil causes densification as air is displaced from the pores between the soil grains. When stress is applied that causes densification due to water (or other liquid) being displaced from between the soil grains then
consolidation, not compaction, has occurred. Normally, compaction is the result of heavy machinery compressing the
soil, but it can also occur due to the passage of (e.g.) animal feet.