The most simple method is to remove everything from your iDevice.
All you have to do is go to Settings → General → Reset → Erase All Content & Settings.
Next; Go to Settings → General → Reset → Reset All Settings.
Alternative method for deleting an Apple ID from your iPhone/iPad;
1. Remove Find My iPhone from your device. This will trigger the Activation Lock and is a necessary step.
If you have enabled Find My iPhone, here’s how you can remove it: Settings → iCloud → turn off the switch for Find My iPhone.
2. Remove Your Device from iCloud: Follow this tutorial here to remove a device from your iCloud Find My iPhone account. If you are selling or giving away the iPhone/iPad, it will require a new setup for another Apple ID. It makes sense to remove the device from your account.
3. Sign Out Everywhere: Go to Settings → iTunes & App Store and tap on the Apple ID field. Then, tap on Sign Out. Next up, go to Settings → iCloud and repeat the process. These are the 2 standard places where you will have signed in with your Apple ID.
4. Reset: Finally, don’t forget to reset. Erase all content and settings from Settings → General → Reset and then for good measure, Reset All Settings too