It will be easier for the tech gurus here to help you if you tell them what sort of internet connection you are using: cable modem, dialup/ISP, DSL, etc.
Off the top, I've found that most of my connection problems have to do with my ISP (dialup, 56K) vendor.
There is also a "timeout" feature in Windows which will shut off your connection after X minutes of idle time. Open "Tools" on the IE screen and go to Internet Options. Go to the Connections tab, then click the "Settings" button to the right of your username (towards the bottom of the display.) When on Settings, click the Options tab and adjust the "idle time before disconnect"--I use 1 hour. OK the screens out, re-start, and see what happens next.
Best of luck!
Recently my computer suddenly disconnects itself from the internet and I dont know whats the cause of it. So everytime it does that i have to restart the comp and connection will be fine again till it plays up. I am using Win Xp and its updated with all its patches. I also have sygate personal firewall and avg which is updated. I have scanned my computer incase there is a virus and came out that its clean. Also did NoAdware scan and it deleted some parasites. I also tried turning off firewall incase it was the problem but yet even it is off the problem still occurs. The OS is freshly installed just a month ago. Please help me because this is very annoying.