
Luis G. answered 09/11/19
Structural Engineer, BSCE, MSCE, PE (Texas)
It depends on the foundation type. Foundations on piers typically are drilled to the depth where there is a stable soil layer that can support the building loads. Depth of slabs on grade would be determined by soil/slab interaction along with applied loads on the slab.
The IRC building code has some minimum required thickness and depths of footings. Depth of stable soil layer is determined by soil testing by a licensed Geotechnical Engineer. Foundation design is done by a licensed structural engineer.
Thicknesses of all materials are determined by appropriate code (concrete, steel, etc.)
If you are in the US, refer to the building official in your area for permitting, adopted codes and other requirements.