in geotechnical engineering, soil compaction is the process in which stress is 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.