You will have to contact the previous owner and have them do it. Apple added activation lock to prevent lost and stolen iPhones from being used, so until the previous owner removes it you will be unable to activate the iPhone.
"If you know the person, then you'll need to get their password from them (or get them to enter it). If you don't have their password (because you bought the phone second-hand) then you should get in touch with the person as soon as possible, or return the iPhone for a refund.
Once you have the password, follow these steps to remove the Apple ID account from iCloud and Find My Friends: