Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Connect it to your computer, select it in iTunes, and click Restore on the first tab.
 
You can also use the device: Settings > General > Reset > Erase All Content & Settings. (Better be plugged into a power source because it takes a couple of hours.)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.