Failure is an outcome of a moment of conflict or uncertainty that has required resolution in which the character's or player's intentions were not achieved. It is the opposite of success, in which the intentions were accomplished, and is generally determined during the execution step of a resolution mechanic (i.e. after the character's initiation has been established, but before the effect of the success or failure is worked out). For example, if a weapon attack fails then the attacker will miss their enemy.
While the terms success and failure imply a binary outcome to a resolution's execution, most resolution mechanics are more complicated than this, e.g. by the mechanic having multiple possible outputs representing degrees of success (e.g. allowing for critical failure or success with cost or opportunities that are otherwise independent of success or failure).
A very common result of failure in role-playing games is that nothing happens and the situation is entirely unchanged, but this approach has faced some criticism. Alternatives to nothing happening after failure include the possibility of failing forward, in which each failure moves the story onwards, often as a result of negative consequences (which may be unrelated to the task being attempted) that the characters must now address.
Another possibility as a result of failure is to reward players mechanically even though the characters have suffered in the fiction. For example, games like Dungeon World award experience points on failure. Chuubo's Marvelous Wish-Granting Engine uses a similar approach for consequences such as wounds, which represent damage in the fiction but provide a bonus when narrated into a scene.