Though not mentioned, I will assume Activation Lock is involved here. If not, the same Apple ID reset (only) applies.
Activation Lock is intended as a theft-deterrent mechanism. A theft deterrent that is easy to bypass would not be much of a deterrent.
Nobody here in the Apple Discussion Forums can help you clear Activation Lock.
To clear an Activation Lock, you will need the password of the associated Apple ID, or the original purchase receipt and a discussion with Apple Support, or similar proof of ownership.
For Apple to clear the lock, you will have to provide a receipt with proof of original purchase and with matching serial number or IMEI, legal paperwork from an inheritance, or other similar proof of ownership materials.
For recovering access to your own Apple ID, if you are the holder of the Apple ID associated with the Activation Lock:
If you forgot your Apple ID password - Apple Support
If you forgot your Apple ID - Apple Support
Apple’s I Forgot Service
How to use account recovery when you can’t reset your Apple ID password - Apple Support
Contact Apple for help with Apple ID account security - Apple Support
If you are the heir:
How to request access to a deceased family member's Apple accounts - Apple Support
Purchasing devices with Activation Lock is unfortunately far too common. These are scams, and other fraudulent sales. These locked devices will not be useful to you, and are probably best recycled. See the following link for more info:
The All Too Common SAD Reality of Buying a Used iPad/iPhone