To try to narrow this problem, I suggest that you first verify that the internet connection is working by pinging something (google.com, for instance). If the ping works, try another browser.
If the ping doesn't work and if you have another computer, test the internet connection with another computer, if you have access to one, to make sure it hasn't gone belly-up.
I have run into similar problems. If they affect only one machine, a good reboot is a good first step. If they affect more than one machine, the cable/DSL/whatever modem may need to be rebooted.
One time, the problem turned out to be that the cable from the modem to the router had worn out; replacing the cable fixed it.
I have found that, in dealing with situations such as this, the first thing to do is to rule out hardware problems. There are two reasons for this: Replacing hardware is easy and all the software troubleshooting in the world won't fix a hardware problem.
Then report back.