If you are talking about "activation lock" (an anti-theft measure), AND if you cannot remember the old Apple ID & Password (even using these instructions:--> If you forgot your Apple ID email address or phone number - Apple Support or these:--> If you forgot your Apple ID password - Apple Support ) neither we, just users like you, nor Apple can help you, sorry, unless you are the original owner and you still have the proof of purchase (receipt/invoice reporting your device’s IMEI or Serial Number). Should be this case, start your request using this link: https://al-support.apple.com/#/additional-support
Shouldn’t be this case, activation lock can be removed only by the previous owner, with the credentials that were used to activate that iPhone/iPad. Without those credentials, that device is useless to you.
You can also take a look at this support article:--> How to removeActivation Lock- Apple Support
Regards
Giulio