I would agree with both @refectio and @bobcat1981 solutions.
If you really do plan to purchase this phone. Go to the seller, and make sure BEFORE you buy the phone, that you can have him passcode unlock the phone AND remove the iCloud locks.
If the seller cannot passcode unlock the phone, RESTORE from DFU mode BEFORE purchasing the phone. This will definitely trigger the iCloud lock. If the seller then cannot get past this iCloud lock, forget about purchasing the phone. This phone must be passcode unlocked AND iCloud Unlocked before purchase or else you will have an expensive brick on your hands.
Make sure he signs out of iCloud, email and other accounts, and Apple ID (under iTunes & App Store).