Static and Dynamic Stability
A table with three legs never falls over, as long as its weight sits above the triangle of its feet. A walking robot that always keeps its center of mass over its support polygon is statically stable: it could freeze at any moment and stay up. Faster gaits give that up, and stay up only by moving: that is dynamic stability.
The support polygon
The support polygon is the convex hull of the feet touching the ground. A robot standing still is stable when the ground projection of its center of mass lies inside it. The static stability margin is the distance from that point to the nearest edge:
What to notice
In the crawl, the robot shifts its body before lifting each leg so the center of mass stays inside the triangle of the other three, and the margin never goes negative. Freeze it and it stays up. In the trot, only two diagonal feet are down, so the support polygon is a line and the center of mass is almost never on it. Freeze the trot and the robot tips. It stays up while moving only because the next pair of feet lands before it falls too far. Fast animals and legged robots like Spot rely on dynamic stability.