First, you need to find your Friend Code.
See the Orange smiley face at the top? Click that. If you go to your own Mii, it should display your Friend Code.
Now you need to register friends. To register each other as friends, stay in the Friend menu and press an orange smiley face with a plus mark. It will then give you two options. If your friend's console is within range, you can both scan the area for eachother and exchange friend codes. If you want to do it long-range, then you must enter your friend's code manually. Be aware that two register both you and your friend must enter each other's codes, and even if you enter your friend's they will not receive a friend request message or anything, so both sides must be aware of eachother's codes.
A good place to exchange codes on the Internet is Reddit, or you can ask people on this site's chat.