A familiar feeling: the phone is in your hands, but in reality it's a glass brick with a pretty backlight.

The main rule of such a purchase: Activation Lock is checked BEFORE money changes hands. You ask the seller to go to 'Settings' → their name → show that the 'Find My iPhone' function is turned off. If the person starts mumbling that they forgot the password or 'I'll reset it later' — turn around and walk away. That's not your seller.

If the brick is already yours — no panic, there are two honest paths. First: contact the previous owner, have them log into iCloud from their device and remove the lock remotely. Second: if the story is shady and the previous owner doesn't answer, but you have the purchase receipt in hand — the path leads to a service shop, where they'll sort it out based on the documents. And, well, a bit of sympathy for you, iron person with a plastic card.