Failure is the broad sense of the term fail
You can say, he is a failure, the mission was a failure. with fail, it's mostly used as a verb, he failed the test.
Stubbed means to accidentally hit something. it's mostly used to say that you hit your toe.
I stubbed my toe against the table.