If black tries to continue the attack, white can play as in diagram. This lets white to capture a stone from either of the marked positions next. White move could as well be in A or B.
A ladder is seldom played out. If the ladder works, there is no reason to try to escape. If the ladder does not work, there is no reason to try to capture.
In this position marked white and black stones have both 3 liberties. There is a race on capturing stones. Here the player who starts capturing opponents stones first wins the care.