To avoid the "Did not!" "Did too!" argument that seems to plague so many childhood games of cops and robbers, role-playing games have rules which describe how to determine the outcome of a non-trivial action. These rules normally rely on the outcome of dice rolls.
The idea goes like this: If you quantify a persons ability in something, into say, a number between 1 and 100 (where 1 is worse than no ability at all, and 100 is total mastery the like of which has never been seen before), and then you pick a random number between 1 and 100, you could tell if the dice roll is less than the character's ability, that the action succeeded.
It sounds complicated, but it isn't really. The level of ability is usually worked out when the character is created and written down, then all a player has to do is roll some dice to see if an action succeeded.
The model even works quite well: it is possible (although unlikely) that an expert mechanic might make a mistake while fixing your car: "Err... what is that extra bolt doing there?". And it's also possible that someone who has never seen an engine before might get very lucky and solve the problem: "Say, is this tube thingy supposed to be unplugged?". The level of ability can also be adjusted to account for the situation at hand: Trying to fix a truck while there are people shooting at you is extremely difficult - even if you are an expert.
The model is not perfect, real life is a bit different, but the model doesn't try to be perfect - after all it's a game, the point is to have fun.