Apple has a support article on how to reset your iPhone, iPad, or iPod Touch as a new device. This way you can pass along your old iPhone, for example, to a family member or friend, or sell it and the new owner will be able to easily start using it and set it up for themselves as if it was a new device. You can read Apple’s instructions here.