both of you get a game with online features. make sure you get the same game cause you can't play each otner if one of you is playing fighting while the other is racing.
once you have a game picked out select the Wi-fi feature usually found on the main menu. search around and you'll find a code of usually 12 numbers like this ####-####-####. share the codes with each other and add their code to your friend list. after a small moment to recognize each other you can play together.
a couple good games to face each other in are Super Smash Bros. Brawl and Mario Kart Wii.
Smash bros has an easy to use online system but has a few connection issues.
Mario Kart has an eady to use system with little to no problems.