Pile foundation is a deep foundation system used to transfer building loads to a deeper, more stable soil layer when surface soils are unable to support the structure. It involves driving or drilling long, slender columns into the ground, which are designed to withstand vertical, lateral, and uplift loads from the structure above.