Since you've arrived at this post, then chances are you chose to jump the gun and install the iOS 8 beta on your iPhone or iPad. You've also surely discovered that the early release is buggy and can't really be used as a reliable daily driver. Well, the good news is that downgrading to iOS 7.1
isn't difficult. Here's how you do that.
Restore a backup
The first thing you want to try is to restore your device via iTunes, so grab your cable and connect it to your computer. Now would be a good time to save any photos that you might have not backed up yet. You must also turn off the "Find my iPhone" feature if you have it activated so go ahead and do that. Then from the iPhone or iPad screen in iTunes, choose "Restore Backup...". A pop-up window with available back-ups will appear. Choose the most recent one (or an older one, if you prefer) and let the software do its thing.
If the backup method fails, or if it isn't available, then you may want to try restoring your device. From the iPhone (or iPad) screen in iTunes, choose "Restore iPhone..." (or "Restore iPad...") and let iTunes bring your device back to its factory state. Restoring it will erase its contents so save your important data before starting the restoring process.
Restoring to factory settings
Your third option, in case these two don't work, is to force your iPhone or iPad into recovery mode. Connect it to a computer and save whatever you have stored on the device, if possible, as all that has not been backed up will be erased. Now make sure that iTunes is running. With the phone still connected to the computer, hold down the power and home buttons for about 6 seconds, or until the screen goes blank. This is your cue to release the power button. Within a few seconds, iTunes will notify you that it has detected an iPhone or iPad into recovery mode. Hit the Restore button and let the software install iOS 7.1 back onto your device.
Restoring to iOS 7.1 via recovery mode