Sometimes your Sprint goes as planned. Like on this picture:

But sometimes your Sprint plan ends like this:

Sad, but sometimes true. Sometimes you end like this.
What to do then? Inspect and adapt. Retrospect. Learn. Improve. And do it better in the next iteration.
P.S. In generals, plans are ehh… just plans.