Timing
Foundations are inspected after excavation, before concrete is poured. The trench is open, the bearing is exposed, and changes are still cheap.
What is being checked
Bearing strata against the assumed design, trench depth and width, presence of trees or drains that affect the design, and whether any local features require a redesign before pouring.
Why it matters
Pour first and you have committed to whatever the ground actually is. Foundation issues discovered later cost an order of magnitude more to fix.