Maybe your DNS resolution is not working.
Try browsing using IP addresses, not names, to see if it works.
Enter 64.233.163.104 in your browser, and see if you can browse. (thats Google's website IP)
If it works, we can work from there
EDIT:
Given your comments, I have a strong suspition this is your ISP's fault: when you use IP addresses, it all works fast. When using names (meaning a DNS query is triggered), it works but it is very slow. This indicates your config is fine, but there is a problem @ your ISP.
My suggestion is: try to contact them, and ask if they are aware of any DNS problemns. Maybe they are doing some maintance in their servers. Also, ask about the IP numbers of their DNS servers. Then, use Start Menu -> run -> cmd -> ipconfig
and compare if the currently assigned IP for DNS servers matches the ones your ISP provided you.
EDIT:
IP (numeric) addresses wil always be faster than using (textual) names like www.google.com. Thats because when using names it must translate the name into an IP address. Your machine query another computer (a DNS server) that has a table matching every name to its IP address. So how fast it is done depends on how fast/busy the DNS server is (and how good/crowed is the network traffic between you and the server)
So using public DNS servers, like you probably did when you searched solutions in the net, is not a good idea: they are usually very busy servers, and they might be "distant" (network-wise) to you. Distant server means high latency, slower response, leading to slow access.
The best solution is to make sure you're using the DNS servers your ISP provide you. Since its your ISP server, you have the fastest possible connection to it, and they are usually not so crowded like public DNS servers.
(small note: your machine (the OS / browser, actually) keeps a small record (a cache) of "recently queried" DNS names, so it only needs to translate www.google.com once. Subsequent browsing/pinging to same address will be (almost) as fast as using the IP address, because theres no need to query the DNS server again. The OS / browser just look at the internal DNS cache)
Hope that helps, and feel free to add more input if you need further help!
2Check your Firewall. – aqua – 2011-02-20T07:28:45.210
1What are you trying to ping and browse? – surfasb – 2011-02-20T08:36:36.137
Describe "cannot browse" - what happens or doesn't happen? Any error messages in the browser window or in the status bar? If it stalls on "Looking up example.com", your DNS is failing, either due to a bad network setting on your end, or your DNS provider is down. See if changing to another DNS helps - Google's DNS, 8.8.8.8, or OpenDNS, 208.67.222.222. (They may not be optimum for you if you aren't in the US, but might help you debug this). – JRobert – 2011-02-20T13:30:49.003
Hi thanks all for your reply.I am in the UK.I get the usual error when you cannot connect to any site.Tried the above but not lack.It seems to work with IP Addresses but not names – user9969 – 2011-02-21T07:45:14.697
"work with IP Addresses but not names" pretty much points to domain name resolution issues. Probably your DNS provider is down or very slow. Does the browser's status dwell on "Looking up example.com" or something similar, while you're waiting? That's another clue that it's DNS. And I assume ping exhibits the same behavior - works with IP but not with names? If so, next stop is your ISP's service desk, if you're using their DNS, or changing your DNS, or both. – JRobert – 2011-02-21T22:57:31.543