Let me give you a technical explaination of the problem and a more permanent way to fix this:
Routers run software, like computers. Usually they run on linux.
A router is made to serve lots of different internet connections and clients, and thus needs alot of different configuration files.
Aside of that, it also happens that hackers/scripts will try to hack your router by sending a DoS attack to your router. (Denial of Service). In these cases, it can happen that your router software crashes.
You can turn off the router or reset it to get it working again. A more permanent solution often is updating the firmware. Do note, once you update the firmware, you loose all the settings and your router needs to be setup again. So make sure you either know how to setup your router, or first write down the settings. Especially the WAN settings and the WiFi settings.
Usually these updates have better protection against DoS attacks, and fixes for different configurations have been added.