Your error could be due to a number of factors:
1. Router lagging you. If you use a router, try connecting without (i.e. DSL modem or something).
2. Punkbuster lagging you. Perform a manual update. Go here:
http://www.evenbalance.com/index.php?page=updatepb.php
Look on that page and find pbweb.exe. Download it and place it in your pb folder. Connect to the web and run it in situ, and update pb.
3. Spyware. Run an anti spyware program like adaware or search&destroy.
4. If you have Norton Internet Security, make sure your Firewall isn't playing up. Try turning it off for a test. Connect to a server without it no, and see if it makes a difference.
If it does, go to the Symantic support site and read their support articles on gaming lag. There are some documents there on different game problems, including COD.