I try to connect to Wi-Fi in Windows. It takes a while, and then fails to connect.
2. Make sure that all cables are connected (for example, make sure your modem is connected to a working phone jack or cable connection, either directly or through a router).
3. Restart your modem, and then restart your router. Remove the power cable from the modem and router. After all lights on the device have gone out, wait at least 10 seconds, and then plug the modem and router back in. Some modems have a battery backup that prevents the lights from going out. For this type of modem, press and quickly release the Reset button. If you don’t see a Reset button, remove the battery instead.
I always recommend isolating the problem as quickly as possible.
First figure out if the modem and router are working properly. Connect with any other device to the internet to check this.
If other devices can connect than this is an issue with your computer, in which case the guide Matthew suggested is perfect.