Most likely, the previous owner did not remove their Apple ID from this iPhone. If you cannot get a hold of the person that sold you this iPhone you may be out of luck. Apple, may or may not, be able to assist you with unlocking the phone.
If you can get a hold of them, have them:
- Sign in to iCloud with their Apple ID.
- Go to Find My iPhone.
- Select All Devices to open a list of devices linked to their account, then select the device to be removed.
- Click Remove from Account.
After the previous owner removes the device from their account, turn off the device and then turn it back on to begin the setup process.
(ref: Turn off Find My iPhone Activation Lock - Apple Support)