Oh, awesome! I believe you talk to the lady in the middle of the top of the Pokemon Center to get your friend code :3 Then just check your Pal Pad in your key items and find your code there. And yep, you need to tell people your code to battle with someone. You can ask for battles right here, too:
Hi there~! :3 Well, to WiFi battle, you'll need to have either a Nintendo WiFi USB Connector or a wireless internet connection. Once you have one of those, you'll be able to connect over the WiFi and battle/trade with other people! Do you know if your internet is wireless? There's a feature built into the DS systems to check if your WiFi is working, so you can mess with it to test.