It's using Nintendo Wi-Fi Connection. The Nintendo DS family can connect using Wi-Fi, when you configure the settings on the Nintendo DS. You can do a number of things whilst doing this, and in the unreleased Pokemon X & Y, you can use StreetPass on your 3DS.
Hope I helped. :)