You need to systematically work from the modem outward in your network.
In the best case you get a failure that stays broken or happens enough that you can tolerate waiting for it to happen again.
To prove it is not your equipment plug a PC directly into the modem when you have a failure. If the PC does not work then you know its the modem or the vendor.
If this works it is likely a issue with your equipment and it gets tougher. On your router during a failure you want to test both wired and wireless ports. You also want to see if the router itself can see the internet. Most routers can ping stuff so try something like 18.104.22.168 or another address you know will respond when it is working.
If this does not work and/or of the wired ports do not work you have a issue with the router. Firmware upgrade is a last resort before replacing it.
If you only have issues on the wireless you have the main reason I do not recommend people use wireless unless they have no other option. Wireless issues are almost impossible to find, they operate on unlicensed bands so you never really know what will interfere. When it works wireless works well when it doesn't only a professional with expensive equipment can tell you exactly why it does not work.
If your problem is the more common one that your network is not down it is just slow certain times of the day that almost always is traffic in the ISP network but if you push them they will point out that 25m is a peak number and that they could deliver .001m and still not be in violation. They make their money by overselling the network and hoping everyone does not try to use it at the same time.
Have a situation with my wireless network and internet connection. Having frequent internet connection loss, mostly throughout daytime hours. Early morning and mid to late evening all is good.
Here are the specifics: ISP is Charter Communications. Paying for 25 mbps, bundled with cable TV only. Have a D-Link Extreme N router, model DIR-655. Also have range extender, Hawking 300N. PC is older HP Pavilion a250n desktop using Windows XP, two laptops HP G50-126NR using Windows Vista. I use channel 11 as this seems to be hardly used in my area. After getting a few bugs worked out so the computer, router and range extender would cooperate with each other, it was like a dream!
But for some unknown reason, my internet connection drops every 5 to 10 mins, or just goes out altogether for hours. Then morning or evening or nite rolls around and it's fine!! Had Charter techs tell me the range extender is bad, my router is bad, but never said perhaps their service is bad. I've changed out modems with them a few times (Ubee D3.0), but still the same issue of frequent loss of internet connection. WHICH, does kick the range extender offline and creates havoc for my family doing homework and telecommuting.
Is it Charter, or the router? If the router was bad, wouldn't it be bad ALL THE TIME and not just during the day?? Oh yeah,...it has been noticed that when the breezes kick up during the day...forget about any connection to the internet at all!!