I'm going to venture a guess that not one person in the history of mankind has ever sat down and mapped out a plan for failure.
Most, if not all people who have ever made plans of any type have done so with the intention of succeeding. However, to grossly paraphrase Robert Burns, mice and men have frequently made plans that they never asked for input on or prepared for unexpected setbacks or detours with, resulting in failure.
Failure, of course, does not mean the end of one's ambitions. It can be used as a very effective learning tool, but it requires a bit of perseverance, and a mindset that allows one to learn from failure. Most successful people seem to have that. They experience a failure or two while implementing their plans, but instead of letting failure knock them off the bicycle forever, they regroup and re-plan, then continue to work towards their goals.
Yes, I know that it is easy to write the aforementioned, but quite another to put it in practice. Failure can be devastating - I know, as I have failed on numerous occasions and have had to rethink my plans again and again as a result.
There have been times when the thought of giving up completely has entered my mind, when I have felt the weight of failure so heavy it seemed it would break me. Somehow, someway, I eventually got back on track and either continued pursuing my plan after working out where I erred, or rethought my course of action and made whatever changes were necessary to allow me to continue pursuing my ambitions.
Over the years I have learned the truth behind the old adage, "Try, try again." It doesn't simply mean get back on your feet when you get knocked down, it means regroup, rethink, re-strategize, and if all of that means you have to retreat for awhile, then so be it - but never stop thinking about what you need to do to achieve your goals, never stop dreaming of the day when you will finally accomplish whatever it is you're trying to do, and eventually you will try again.
Perseverance. That's the key. Sit down and figure out what you want to do with your life, or with the next ten years, or even with the next week, then draw up a map that has a clearly marked out path that will get you where you want to be. And then persevere in following that plan, regardless of how often you are stalled by failure.
Perseverance is the key, that and learning from your failures and applying the lessons. A little luck never hurt either, but mostly what you need is perseverance.