do you have an internet connection? If so, make sure its turned on and installed correctly. Also make sure your using a host machine's IP adress. If your hosting the game, make sure any firewalls are turned off or temporarily disabled.(i do this every time i play online) Make sure your system meets the minimum requirements for online play.
I hoped i helped you
sw123