Settlement happens when the ground beneath a foundation compresses or loses support. Common causes include soft or compressible soils, poorly compacted fill, changes in groundwater, leaking drains washing out fines, tree root moisture extraction, and excavation close to existing foundations.
All buildings settle a little as loads come on to the ground. The problem is differential settlement, where one part of the building moves more than another and the structure has to accommodate the difference, usually by cracking. Uniform settlement of a few millimetres is generally harmless.
The most frequent causes in practice are compressible or variable ground, made ground that was never compacted, leaking foul or surface water drains eroding soil beneath foundations, and moisture change in shrinkable clays around trees.