Depends, to make a server you need to use LogMeIn Hamachi, or use the same network as your friend (the same internet connection, like, be in your house). If you use LogMeIn Hamachi then make a new network at the Network tab, then write Username Password and then click finish. Give the Username to your friend and the password too.
As soon as he joins, give him your
HAMACHI IP adress. It is located near the OFF/ON button in the left up corner. He should use that to join you. If you want to join him, he needs to do everything i said before that and then you need to join. If you are using the same internet/network connection, you can just write
localhost instead of the IP.
If you are not using Hamachi and not located at the same network/internet connection, you can check your IP at
http://www.whatismyip.com/ 