Before you do that, you must make sure that you have access to wi-fi in the first place, like at your house. It must also be WEP, not WPA.
Instructions below are copy/pasted from WikiHow:
1. Setup a wireless router on your home computer
2. Insert a wi-fi compatible game into your system
3. Look through the instruction booklet that came with your game to see how to access the connection setup.
4. Tap "Nintendo Wi-Fi Connection Settings".
5. Tap an available connection settings slot.
6. Tap "Search for an Access Point".
7. Wait for it to find a router or hotspot, then tap the one you are using.
8. Enter your WEP (WPA Not Supported) and click or hit save.