Im unsure from your description if you originally connect to the internet, it works fine for a while, then it stops working or if you connect to the internet and it does not work for a short period of time, but then starts working.
If the former, where it works fine for a while and then stops, you may want to check the Power Management tab of your network adapters properties in Device Manager to ensure the system isnt shutting down the adapter for power saving.
If the latter, where it doesnt work for a while and then starts, you may want to check your DNS configuration. If you have multiple DNS servers assigned by DHCP, it could be that the first server is malfunctioning but the second server is working properly.
When you attempt to contact a named resource (website), your computer first attempts to use the primary DNS server to resolve the name. Only when the first server times out or fails to resolve the name is the secondary DNS server attempted.
In either scenario, the first step I would recommend is to update the driver for the network adapter.
Brandon
Windows Outreach Team- IT Pro
Windows for IT Pros on TechNet