Activation Lock Problem
It requires the Apple ID and password of the previous owner. If you don't have it and cannot get it, then the device is useless to you. Return it for a refund, if you can, or take it to an Apple store for an exchange, You must be the original owner, and can produce the original sale receipt along with a photo ID.
Find My iPhone Activation Lock: https://support.apple.com/en-us/HT201365
Turn off Find My iPhone Activation Lock: https://support.apple.com/en-us/HT201441
If you can't activate your iPhone - Apple Support: https://support.apple.com/en-us/HT201407
In the future check first before buying second hand:
Make sure you have a look at the Lock screen
If the device has been remotely erased or put in Lost Mode by its previous owner, it is very likely that a message will be showed on the Lock screen, warning that this device was lost or stolen. If you see such a message, it should raise some flags, but don’t be alarmed quite yet, as the seller could have put the device in this state. You’ll be able to verify that in the next steps.
If there is a passcode on the device, ask the seller to type in his passcode, then proceed to step 2.
Have the seller reset the device in front of you
If this person is selling the device, then he shouldn’t have any problem agreeing to perform a complete reset. Ask the seller to go to Settings > General > Reset >Erase All Content and Settings. If the seller uses Find My iPhone, he will have to enter his Apple ID password to confirm the erase.
The erase process should take a couple minutes or so. During that time, the device’s screen will show the Apple logo and a progress bar. Wait for the reset to be completed.
If the seller doesn’t want to reset the device or is making excuses for it, then walk away.
Begin the device set up
Once the device has been reset, start going through the set up. You will have to choose the language, country, and a Wi-Fi network. At this point, you will be asked to enter your Apple ID and password. If that’s the case, then you’re safe to buy the device.
However, if you see a Acitave iPhone" message asking for the previous owner’s Apple ID and password, or a message saying this device was lost and erased (similar to the screenshot below), then you know something is wrong. Ask the seller to enter his Apple ID and password. If he’s unable to get past this screen, then just walk away as this is a clear sign this device was either found or stolen.