There can be many reasons for Wifi dropping out or not working. Some basic things to try:
1. Turn the wifi router off and on. Leave it off for about 30 seconds in case your model needs to 'discharge' to reset completely
2. How far away is the router from your device? Maybe there's a think wall or some sort of interference between it and you. Some of these can be:
- thick / dense walls (particularly metal, concrete and plaster)
- try placing the router somewhere else and see if it makes a difference
- wireless phone handsets or speakers (some operate on the 2.4 GHz frequency that WiFi typically uses)
- if you have those, try powering them off and seeing if that makes it better
- microwaves and other electronics
- power cables / boards behind walls and around the router
- neighbours WiFi on the same frequency and channel
- restarting the router will prompt it to search for a clearer channel and use that (most new routers do but some don't) but a more permanent solution would be to investigate wireless networks in the area with something like the WiFi Analyzer Android app or its Apple equivalent, find the clearest channel and set your router to that.
If none of that helps, you might just need a new WiFi router. In most households, the WiFi router is also the internet router - so a cheaper and easier way to upgrade would be to just purchase a WiFi router without internet capabilities and set it up alongside the existing one. This will save you having to reconnect to the internet, and having to connect whatever other devices you might have all over again.