Welcome to Android Central! Are you talking about losing connection on your home network, or any wifi network? If it's your home network only, there are a few things you can try:
1. Reboot the router, i.e. unplug the power, wait 10 seconds, then plug it back in again, and wait another 20-30 seconds for the network to reestablish.
2. On your phone, go to Settings/Wireless & Networks/Wi-fi, select your home network, and Forget it. Then reconnect.
3. Try turning your router's security off temporarily to see if that's causing problems. To do so, check the router manual to learn how to access its settings from your desktop browser.
4. If turning the security off helped, then try turning it back on, but this time use a different encryption protocol (e.g., WPA instead of WEP or vice-versa, or AES instead of TKIP or vice-versa).
5. Install an app like Wifi Analyzer on your phone and see if there are a lot of other wifi networks around you that are using the same channel as your router. If there are a lot, then change the channel your router uses by going into its settings.