Friend codes enable two people to battle, trade and all that. You need to swap a friend code first, then you can meet in the WiFi room to battle and trade and all that in private. Also... http://pokemondb.net/pokebase/111202/how-do-friend-codes-work