Before you reset your iPhone, it's a good idea to backup the data in the iPhone. To do this go to Settings ► iCloud ► Backup. Click the Backup now button.
In addition to backing up data to iCloud, you can use iTunes to do the same.
- Sign Out from iCloud
Since you do not want anyone to access personal data in iCloud, you need to sign out of iCloud or delete iCloud account - depending on which iOS is used.To do this, just go back to the Settings menu ► iCloud ► Sign Out. Click the Sign out message that appears and do not forget to enter the password if requested.
- Reset iPhone
After backing up and deleting the iCloud account, the next step you have to do is reset the device.
To do this go back to Settings menu ► General ► Reset ► Erase All Content and Settings ► enter password if prompted ► Erase.
Just for information, when activating Find My iPhone feature, you will be prompted to enter your Apple ID and password. This is an important and necessary step, as Find My iPhone uses a security system feature that prevents thieves from shutting down Find My iPhone or deleting your content.