Please describe how your internet connection isn't working maximally now. If it's slow, intermittent, etc. then please describe exactly what's happening.
Since an internet connection usually involves an access point, router, cable modem, or other device, any sub-optimal performance may be the result of that device (or devices, depending on your configuration). You'd need to tell us what device(s) you're connecting with, how your Mac connects to it (ethernet, wifi, etc.), and if wifi is used, how close your Mac is to the internet device.
Finally, your ISP plays a substantial part in the quality of your internet. Sub-optimal performance may have as much to do with that as anything else. What level of service are you paying for, from which provider, etc.?
If using wifi, can you try to plug in via ethernet and run a speed test? To see what speed is coming into the home.
Along the lines of ISP quality, could be that you are using their DNS servers, which when poorly implemented, can slow things down. And is easy to change. Go to your network settings and change the DNS settings to be a couple of these:
IBM backup: 188.8.131.52
Google backup: 184.108.40.206
Depending on the router, might be able to set the DNS there as well, to default for the whole household.
Prior poster has it right. Change up the DNS to Google. See if that helps.
If you're on wifi, you really want to be wired/ethernet. If the cable modem or router is far from your setup and there's no readily available ethernet outlet, then use a powerline networking solution (such as Netgear's Powerline), which will carry your ethernet data/traffic over existing powerlines in your house. It's fast, effective, good latency, and generally is much better than wifi.