Can't join and minecraft multiplayer server?

It either says "can't resolve hostname" or it just doesn't connect to any multiplayer servers. I'm sure I've got the latest version, and everything seems to be fine. I'm so confused of what's going on.

Added (1). *a. It says and. Sorry.

The server might not work with the latest version each MC server has a certain version in works on this server could be 1.7.1 or what ever find out what version it works on and select that version