Not to split hairs as the saying goes but ... Go to Settings>General>Reset>Erase all content and settings.
Some people recommend signing out of your Apple ID before erasing the device and if you want to do that go to Settings>Store (or iTunes & App Stores in iOS 6) and tap your ID and sign out. Then erase the device in the settings as described above.
Unless you want to reuse it yourself then just do Erase All Content and Settings.
Wipe iPhone/iPad/iPod touch clean
There are a few steps to do:
Switch off iMessage in Settings > Messages
Switch off FaceTime in Settings > FaceTime
Delete iCloud in Settings > iCloud > Delete Account
Finally Settings > General > Reset > Erase All Content and Settings.
Un-register your device: https://supportprofile.apple.com
Now you can sell/give.