How do you become friends with someone?
Not sure about console but on PC at the top of your friends list there is a 'Recent players' tab.
If you right click on a person you will see an 'Add friend' option in the dialog menu which, provided that they accept the request, adds them to your battle.net friends list.
You can also right click on a person's name in chat and add them that way (as pointed out by GnomeSlice below).