Essential in most story lines is the sense of growth, of moving from one state of being to another. This could be personal change in an individual or the achievement of a goal. The progress of moving from one state to another is termed the major story arc and it is this that drives the plot to the finish line. The major arc usually has multiple stages - an initial state or set of conditions, various changes to that state or those conditions, and the final state. The rule of three generally applies. That is, that there should be two failures before the final success.
Each of the failure episodes or arcs begins with a set of conditions, passes through some sort of action, and then achieves the final failure. Only the third and final attempt does success occur. This is a pretty strict rule in that more failures would be boring and achieving success quickly provides no satisfaction to the reader. The other reason is that each of the attempts allows the writer to present alternatives that might work, but contain a fatal and usually unforeseen flaw. Ideally, the protagonist learns from each failure. Also, each lack of success informs the next attempt in some way.