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.
A mistake is when, really, you know better, and do it that way anyway.
One of the most valuable lessons I learned from my creative writing professor, the poet Kenneth Koch, was that there's no downside to writing a lot. You don't have a limited number of words that you can write in your life.
The corrolary is that you shouldn't be afraid to try and fail. Just make sure you learn from the things you tried that failed. I can't remember which scientist was known for his cheery response to experiments with negative results: "Well, now we know that
doesn't work!" Every failure gets you closer to success, assuming you don't repeat it.