If you know the iPad passcode, go to Settings > General > Transfer or Reset iPad > Erase All Content and Settings
If prompted for Apple ID password, you must enter it to turn off Find My and complete the reset
If you forgot the Apple ID password, reset it at iforgot.apple.com before erasing the iPad
If you cannot recover the Apple ID password, contact Apple Support with proof of purchase
If the iPad is managed by a school or company, contact the organization’s administrator
If the iPad is activation locked, it cannot be set up again without the Apple ID and password used on it
If you do not know the passcode, use Recovery Mode with a Mac or PC and restore the iPad through Finder or iTunes
After restoring, you may still need the Apple ID password during activation if Find My was enabled
If you bought the iPad secondhand, ask the previous owner to remove it from their Apple account at iCloud.com/find or from their device
If you only want to erase personal data, use a computer restore only after confirming you can complete activation afterward
