You can use this in almost any game. It's for when the task resolution system native to that game sucks or is confusing or doesn't cover a given situation. It's derived--in my mind--from the Warhammer 40k melee combat system but probably exists in other games, too. In fact, I'll be kinda shocked if I invented this. Anyway...
Rolling to do something the other person doesn't want you to do (grabbing something away from him/her or psionically zapping them, for example), or something otherwise competitive (picking up an object first) or even (if you wanna go crazy with it) an action against a static thing (trying to read a difficult book) is an opposed roll.
The die roll's based on the relevant stat. If, say, you're car-chasing someone, that'd be dex or agility or drive skill vs, the opponent's dex, agility or drive skill. If you're trying to hit a pedestrian that could be drive skill vs. dodge skill. If you're trying to charm a sentry that could be your charisma vs. the sentry's wisdom. With reading a book it could be the intelligence of the reader vs. the difficulty of the book (measured on a scale of 3-18 if it was D&D, just like intelligence.) As long as the two stats being paired are measured on the same scale (or can be mentally converted to the same scale), you're cool. If you have "fix computers" at 34% then the GM could say "Ok, on a scale of 1-100 how hard is this computer to fix?" and pick a number.
Contestants both roll dice. The die rolled should be whatever die's value is nearest to the higher contestants stat rounded up to the nearest die (i.e. if the higher stat's a 5, roll d6, if it's 70, roll d100, etc.)
Anyway, both sides roll a die and add their stat. High roll wins.
Example: Teddy and Cheswick are stalking each other through the jungles of Marsoopia. Who sees who first? Teddy's wisdom is 8, Cheswick's is 12. They both roll a d12 to see which one notices the subtle signs of their quarry first. Teddy rolls a 7, Cheswick rolls a 2. Teddy's at 7 + 8 =15, Cheswick's at 12 + 2 = 14. Teddy sees Cheswick first.
(Note: in a game where the ability scores represent vastly differing power levels--like a super-hero game--roll a die that equal to half the spread of the stat. i.e. If it's a 3-18 system and an 18 represents Thorlike strength, contestants roll a d10 instead of a d20. In Warhammer it's a 1-10 system with 10 representing greater demons and they use a d6. The idea being that the chances of the Hulk getting out arm-wrestled by Jimmy Olsen decrease if you use a smaller die.)
I notice this is considerably more fun than just having one person roll, and avoids having to decide which character is "active" and which is "passive" and crap like that. Who's active and who's passive when the medusa's trying to look at you while you're trying to get her to look at a mirror?
Notes on using this for combat:
Since most systems either have--like D&D--one roll that represents getting past both the target's nimbleness and armor combined or else have dodging cost an action for the dodger, you wouldn't normally want to use this for most combat since it'd throw off the whole system. It works real well for grappling, however.
Obviously there are some pain-in-ass exceptions here that make this mechanic harder to use in certain games: halving a % system means using a d50 which is kinda hard to come by, and sometimes you will end up with a stat vs. a stat on a different number scale. However, certain kinds of minds will be able to use a little creative multiplication and division to get past this stuff. Certain other kinds of minds will say how they're perfectly happy with all aspects of the system they're using so fuck off, which is fine, too.