Failure is not the opposite of success as many believe - failure is a step to success. (In the short term, sometimes this step can be skipped, but in the long term it is essential.)
For example, if it takes 10 steps to achieve your goal but after 3 steps you say "I have failed!" - you should really change your perspective. As the saying goes, it matters not how many times you fall down, but how many times you get up again. Failure is simply that which is not success yet.
I must stress that this is not philosophical feel-good bullshit.
There are many ways to learn: you can learn from memorizing texts, reading books, watching movies, observing others, playing simulations, etc. However, if you ask a psychologist, he will tell you that the way our brain works, the fastest and most thorough way of learning is through actually doing it.
Successful people understand this very simple fact. If you wish to be successful, throw your fear of failure out the window and start failing.
After a while you will see that the time between setting a goal and achieving it gets shorter and shorter - all thanks to 'failure'.