From the main screen in Super Mario Run, you'll see Friends in the upper left corner. Here, you'll see four options: Accept, Link, Invite, and Add. When you add a friend (which is done by tapping Add and entering their Player ID), you can tap on their avatar to view their stats (such as how many gold coins and Toads they have or how many Rallies they've won). You can also have a Friendly Run, which is basically a practice race against a friend. You have a limited number of Friendly Races, based on how many Worlds you've defeated. When you play in Tour, you'll also be able to see who has the best score among your friends for each level. Sometimes, your friends will appear as an option when playing Rally; that is not the same as a Friendly Race since you'll receive coins and Toads.