If you own the account linked to the device
Enter the Apple Account credentials requested on the device. If you have forgotten the password, recover it with a trusted Apple device or at iforgot.apple.com.
If you sold or gave away the device
The previous owner can remove it remotely through Find My or iCloud.com. They should sign in privately and remove the device themselves; they should never share their password with the new owner.
If you have valid proof of purchase
Apple provides an Activation Lock support request for people who need help and have proof-of-purchase documentation. Apple reviews each request, and this site cannot predict the result.
If it is a second-hand device
Contact the seller and ask them to remove the device. If they cannot or will not, return it if possible. An IMEI lookup or third-party bypass claim does not substitute for the owner’s authorization.