If you are unable to connect to the internet after removing spyware with utilities like Mawarebytes you can try the following.
From the Control Panel choose Internet Options, once open go to the Connections Tab and click on Lan Settings. Unless you are on a network that uses a Proxy Server (rare), make sure there are no check marks and all the boxes are clear. Click OK twice to close both boxes and try to connect to the internet again.
If the internet still does not work you can try going to Internet options again but now going to the Advanced Tab and choosing both Restore Advance Settings and Reset and then clicking OK and tying the internet again.
If that does not work you can also try a Winsock repair utility.