Apple® Article - What To Do Before You Sell or Give Away Your iPhone, iPad, or iPod Touch

Navigate to What to do before you sell or give away your iPhone, iPad, or iPod touch and follow the applicable steps.
Note If you no longer have physical access to your device, scroll to the appropriate section (includes info for removing from your account remotely via iCloud).