Could be either a proxy issue, a malware issue, or a firewall issue.
To check your proxy settings go to internet explorer. Click on tools > internet options > connections tab > LAN Settings button > make sure there are no proxies set and uncheck use a proxy server > click ok and ok > Try your internet. If it works then restart your computer and see if it still works. If not then your ISP has a internet accelerator using the proxies and you need to call them to figure out what has happened.
To Check if malware has caused problems with your winsock or hosts files go use the following tools.
Winsock XP Fix (run it and let it restart your computer)
http://www.majorgeeks.com/download4372.html
Hi-jack This(HJT)
http://www.trendsecure.com
With HJT tell it to create a log and post the contents of the log on here and we can tell you which entries to remove.
If it's a firewall issue you will need to look through your exceptions lists to find out what is wrong. You may need to contact the provider of your firewall for help, as we do not know what you use.
Good Luck HTH.