- Go to Settings
- Tap on General
- Scroll all the way down and tap Reset
- Choose Erase All Content and Settings
- Enter passcode (if you're using one)
- Select Erase iPhone (twice), confirming that you REALLY want to lose everything
Once the process is complete, you'll be left with a "factory fresh" installation of the iPhone OS with no trace of you or your data.