A failure is a project that doesn't work, an initiative that teaches you something at the same time the outcome doesn't move you directly closer to your goal.
A mistake is either a failure repeated, doing something for the second time when you should have known better, or a misguided attempt (because of carelessness, selfishness or hubris) that hindsight reminds you is worth avoiding.
We need a lot more failures, I think. Failures that don't kill us make us bolder, and teach us one more way that won't work, while opening the door to things that might.
School confuses us, so do bosses and families. Go ahead, fail. Try to avoid mistakes, though.