How can we use our failures to advance and adapt (in anything)?

How can we use our failures to advance and adapt (in anything)?