Open the settings app, go into general, scroll all the way down to reset, click "erase all content and settings". You will have to enter the iPad's passcode and your Apple ID password, and then the iPad will reset to factory settings.
Sent from my iPhone using Tapatalk