In a set of simple, easy to follow steps:
1. Get your friend code by connecting to Wi-Fi from the downstairs room in any Pokemon Center, if you haven't done so already.
2. Acquire the friend code of the person you plan on battling.
3. Connect to Wi-Fi again, and wait in the Wi-Fi room for the other person.
4. ? ? ? ?
5. PROFIT!
Since this is the first time anyone has asked how to do this here from what I know, I will assume that these steps are relatively simple and self-explainatory.
Topic locked, and I highly suggest you check your spelling and try using punctuation unless you want to become dragon food...*Nods to Stardust Dragon over the shoulder.*