Hi there. Welcome to the forums. What is the make and model of your phone? I am sorry but you will probably have to find the person you bought it off and get them to unlock it, remove their account from the phone and factory reset it for you, otherwise you will have even more problems in the future if you ever need to reset it.
Whenever you buy a phone used, you need to make sure those steps are followed before you pay for it. They need to go into settings, accounts and remove all their listed accounts. This will disable phone reset protection. Then the phone needs to be factory reset and all data removed and then you set it up as a new phone.
If their details are still on it the phone is just trouble for you.
Please register for an account so we can help you further. With a guest account, you can't reply. Thanks
https://forums.androidcentral.com/showthread.php?t=409154