This started happening about a month ago where when I join a online server I get disconnected after a while some times its about 10minutes after joining some times 5 minutes it's really anoying and has stopped me from playing online games for the time being. I dont know what can be causing this. I have AIM and that never disconnects or any thing its just online games. I scanned my computer for viruses using AVG free edition and deleted one infected file, but I still have the same problem.
Try disabling any Firewalls, Virus Scanners you may have running in the background. Also you try reinstalling your Network card drivers. Finally you should try calling your Internet Provider and see if they can have a tech come out and check the line. You may be having "upload" issues.
Try going to Speedtest.net and checking to see if your download and upload bandwidth is where you expect it.