1. Power down the device. Wait for it to completely shut down.
2. Connect the USB cable to your computer and start iTunes. DO NOT plug in the iPhone/iPod yet.
3. Press and hold the home button on the iPhone/iPod. While holding it, plug the USB cable into the phone. Keep holding the home button until "Connect to iTunes" appears on the screen, or iTunes says it has detected an iPhone/iPod in recovery mode.
4. Restore the iPhone/iPod to factory, update if it asks. If you have a previously saved backup of the device in your iCloud, you can now restore from that or simply start using it as a new device.