More information is required to know the exact root cause.
Anyway, you can do the following, assuming you are on Windows 7 OS.
1. At System Tray, right click on Network icon and click troubleshoot problems. This will not do a miracle but will find some issues and suggest remedies.
2. Open a command prompt and ping any known server on internet or use nslookup command on popular internet sites like google.com. If you get answer, you know you have connectivity.
3. If you are using any proxy server, check if the settings related to proxy server are correctly configured in your browser’s connectivity tab.