If you want to play with a friend, simply ask the friend to create a server then give you the IP of it. But if you want to play on a random server, just search for "minecraft servers" or something like that on Google. Copy the IP you want.
After you have acquired the desired IP, after log-in click on Multiplayer and paste the IP in the blank space. (you can also type it, which is longer).
Happy SMP-ing and beware of creepers.