Chosen Solution

I bought a phone from a friend and he didn’t know how to reset it. Could you help ,e out

without your friends icloud account and password, there is no REASONABLE way to remove the account to make the device usable again. If you still have contact with that friend, you should ask them to remove it.