When your internet goes down it can be very concerning. Here are a few things to try to fix "the internet".
1) Check to see if your router has internet!
The first thing you should do is determine if your router is connected to the internet. What you are looking for when connected to your router depends on the brand of router you are using. Usually, you are looking for a light on the router labeled "WAN" or "Internet". The light might be white or green and is usually solid. I recommend looking at your router when it is working and noting which lights are on, what colors they display, and whether they are blinking or solid. That way you'll know what's different when something is wrong. In a pinch you can always look at the manual for your modem, assuming you have one.
2) Determine if the internet is down for every device or just the device you are trying to use.
Second, determine if the problem is just isolated to your computer, tablet, or phone device, or if it is affecting all devices. If you have devices that are plugged into the router with an ethernet cable be sure to check those first. If those are working, but wireless devices aren't then the problem is probably an issue with your Wi-Fi and not the internet at all.
3) Restart affected devices.
Many "customer service" agents will tell you to restart your device immediately. However, I prefer to try to determine what is wrong first. If some devices are working on your network, then try rebooting just the device(s) that aren't working. If that doesn't work, or if none of the devices on your network are working, try rebooting the router. You'll need to wait several minutes after rebooting your router for it to reconnect to the internet. Depending on your technology it may take up to 5 minutes to reconnect so be patient.
For more troubleshooting suggestions I recommend this article on PC Magazine's website: 12 Tips to Troubleshoot Your Internet Connection