How to delete/remove your Apple ID
The most simple way is to remove everything from your iDevice.
To do this, all you have to do is go to Settings → General → Reset → Erase All Content & Settings.
Then, Settings → General → Reset → Reset All Settings.
Alternative method for deleting your Apple ID from the iPhone/iPad
1. Remove Find My iPhone: Firstly, remove ‘Find My iPhone’ from your device. This will trigger the Activation Lock.
If you have enabled Find My iPhone, you can remove it from: Settings → iCloud → turn off the switch for Find My iPhone.
2. Remove your Device from iCloud: Watch this tutorial here to remove this device from your iCloud Find My iPhone account.
If you are replacing the iPhone/iPad with another device you will have another Apple ID so 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 that you will have signed in with your Apple ID.
4. Reset: Erase all content and settings from Settings → General → Reset and then Reset All Settings too