To transfer ownership of an iPhone, it must be disconnected from the first owner's iTunes account. Otherwise, the phone will still want to purchase apps and media under the account of the original owner and will ask for his or her password. The original owner will also want to wipe all of his or her personal data. This can be accomplished by setting up the iPhone as a new device.
Open iTunes on your computer and connect the iPhone with the included cable.
Select the device from the list of sources.
Click on "Summary" and then "Restore."
When iTunes finishes restoring the device, it will take you to a "Set Up Your iPhone" screen. Choose "Set up as New."
Tap the "Settings" icon.
Tap "Erase All Content and Settings."