Looking at a diagram, is often a good way to understand a problem. Below is a simple diagram that shows the fault current path.
You can see that the fault current will flow through all the breakers, and return to the source (the transformer) along the grounding conductor.
You might be inclined to think that the fault current will be extremely high (tens of thousands of amperes). However, due to the fact that wires have resistance, the current might be surprisingly low.
Without knowing the exact length and size of each wire, it's not possible to approximate the resistance. If you did have that information, you could calculate the resistance. With that, the voltage, and Ohm's law, you could calculate the fault current.
For this example, we'll assume the fault current is less than 100 amperes.
Because the current is not above the instantaneous trip level of any of the breakers, the short-circuit protection of the breakers will not trip. However, circuit breakers also have thermal protection, which opens the circuit based on overheating caused by current flow (overcurrent).
Each breaker will trip according to it's trip curve, based on multiples of current over the rated current of the breaker. Basically, as the fault current flows, the thermal protection device in each breaker begins to heat up (along with all the wiring in the circuit). Obviously the larger breakers (100 & 200 in the diagram) can handle more heat (current), so they're going to be able to handle the less than 100 ampere fault current.
Since the fault current is higher than the rated current of the smaller breaker (20 in the diagram), the thermal protection device will begin to overheat. With such a high current flowing through it, the device will likely open within a few seconds. However, if the current was lower, it could take much longer to trip (even minutes).
If we take another example, where we've figured the fault current at 150 amperes. Even though the current is now higher than the rated current on three of the four breakers, the smaller breaker is likely still going to trip first. This is because the time before the thermal protection of a breaker trips, is based on the the amount of fault current above the rated current.
The fault current is only 1.5 times higher than the larger breaker, but 7.5 times higher than the smaller breaker. Because of this, the smaller breaker will trip sooner. Thermal protection is designed this way, so that loads can draw over the rated current, but only for a limited amount of time. This allows things like motors to start, without tripping the breaker.
In most real world applications, the smaller breaker will trip first. If the resistance of the fault circuit was low, it's possible for the fault current to be above the instantaneous trip level of all the breakers. In that case, the first breaker (main) will likely trip first.
If any of the breakers are GFCI breakers, and the fault is to ground, the GFCI breaker will trip first.