It is locked? -->
'Activation Lock for iPhone, iPad, and iPod touch' is a security feature that's designed to prevent anyone else from using an iPhone, iPad, or iPod touch, if it's ever lost or stolen. To learn more click here --> http://support.apple.com/HT201365
For an individual to remove an activation lock absolutely requires the information for the account that applied the lock. Click on this link to learn 'How to remove Activation Lock' --> https://support.apple.com/HT201441
If you do not know the required information and you are not the original owner, get the owner of the account to remove the lock or return the device for a refund or recycle the device. The device is otherwise useless to you. If the owner is unknown and has not provided contact information as a message showing in the login screen, there is no way to contact the owner unless the person who gave you the device knows them.
Here are additional resources if you are the original owner, or know the owner to be able to provide assistance in doing any of the following things:
Help with a lost Apple ID or password:
• "If you forgot your Apple ID" [this is likely an email address you are using or used in the past] click here --> https://support.apple.com/HT201354
• "If you forgot your Apple ID password" click here --> https://support.apple.com/HT201487
Reset device:
Apple can completely reset a device if a person can provide sufficient evidence of valid ownership. This is done online at: Activation Lock support request - https://al-support.apple.com/#/additional-support Apple says, "Proof of ownership documentation is required," but does provide details as to what is acceptable proof. Prior to this new online service Apple typically required the original receipt issued by Apple or an Apple Authorized Reseller and documented provenance (so typically it would be the original owner who does this, or a descendant with legal proof of ownership).
Or is it disabled? -->
Unfortunately if you have a forgotten/unknown device passcode, or have a disabled device, you have no option but to erase the device. However, you can eventually restore the data and settings from a backup you made before the device was disabled. You must have a computer to use the method below. If you don't have a computer, borrow one from a friend, or go to an Apple Retail Store or Apple Authorized Service Provider. You can also use a PC with iTunes. You will likely also need your Apple ID and password. All Apple mobile devices follow the same general procedure but the link below and other links off it provide model-specific instructions:
'If you forgot the passcode on your iPad, or your iPad is disabled', click here -->
https://support.apple.com/HT211078
Here is a related video which to me has more complete and clearer instructions: https://www.youtube.com/watch?v=7s8-zLG9ySQ
Steps:
1. With the device disconnected from a computer use the model-specific instructions in the links above to shut down the device.
2. Connect it to a computer with Finder or iTunes (Mojave or earlier, or PC).
3. Restart into recovery mode (black screen with a cable indicating attach to computer).
4. When prompted, click "Restore" to erase data & settings, and update system software. May take some time.
5. Set up your device ( https://support.apple.com/kb/HT202033 ). Partway through you are offered the opportunity to restore your data and settings from a backup, or you can do this at a later stage ( https://support.apple.com/HT204184 ). Even if you have no backup, if you were using some iCloud services to sync items such as Contacts or Photos those may reappear once you sign back into your iCloud account --> Set up iCloud on your iPhone, iPad, or iPod touch - https://support.apple.com/HT208681
'If your computer doesn't recognize your iPhone, iPad, or iPod' click here --> https://support.apple.com/HT204095
---
On the contingency you are asked for your Apple ID and password AND you have forgotten those:
If you forgot your Apple ID, click here --> https://support.apple.com/HT201354 ; your Apple ID password, click here --> https://support.apple.com/HT201487 , or to jump directly to the forgotten sign-in information help site, click here --> http://iforgot.apple.com/
What to do after [or before] you change your Apple ID email address or password - https://support.apple.com/HT204071
If you still need help, contact Apple for help with Apple ID account security --> https://support.apple.com/HT204169