Don't discount the possibility that the problem isn't with your computer, but with the Wi-Fi network. It's possible the signal is too weak to connect. If you're using a laptop, move around to see if that helps. Wi-Fi can have trouble going through walls, and so any home or office could have dead zones.
First, can other devices (like your phone or tablet) connect to the Wi-Fi network? If not, then the router might be having its own issues.
Reboot it by unplugging it for two minutes, then plug it back in and let it restart. If you have a separate internet router, unplug it too, wait a minute, and plug it back in before restarting the Wi-Fi router.
If you still can't connect, the issue might be with your internet service provider, so contact the ISP to see if there's a service outage.