Friend Codes are twelve-digit codes unique to a Nintendo 3DS system that can be exchanged with friends and be used to maintain Friend Lists, a collection of friends established by exchanging codes with them per local or internet connection. You can only keep up to 100 friend codes.
On the Friend List application that can be loaded from the HOME Menu, players have the option of registering friends for their system. This is can be done in two methods: "Local", in which the 3DS scans for nearby systems and automatically registers them, and "Internet", which is done by entering another player's friend codes in the area provided. In the case of the latter, both recipients must enter each other's code for them to appear on their respective lists.
Once registered, a friend card appears, which displays a friend's name, Mii, online status, message, and favorite title. Players can play cooperately or against friends in games that support online play. Once a system update bundled with Super Mario 3D Land is downloaded onto the system, players can simply join online games their friends are playing with the touch of a button.  Unlike the online system for Wii, the 3DS eliminates the factor of having one friend code per game, and establishes one friend code per console. You can use Swapnote to allow friends to exchange messages, pictures, videos, and sounds with each other.