If you have a second hand phone that is activation locked to someone else's account, you need to talk to whoever you got it from.
Only the owner of the account used to lock it can unlock it.
There is no way to bypass the activation lock.
It is an anti-theft feature designed to make a lost or stolen phone unusable.