A foundation refers to the structural base or substructure of a building that supports and anchors the entire edifice to the ground. The primary function of a foundation is to distribute the load of the building safely and evenly to the soil or rock beneath, ensuring stability and preventing settlement or structural failure. Foundations can be built using various materials and techniques, such as concrete, stone, or steel, and they are designed based on the characteristics of the soil, the weight of the building, and local environmental conditions. Common types of foundations include shallow foundations (such as strip footings or slab foundations) and deep foundations (like pile foundations or caissons), each serving different purposes based on the construction needs and soil conditions of the site.