Make sure to wipe your old phone properly so personal information doesn't end up in the wrong hands.
Back up data, including photos and contacts, Then remove the SIM card, and microSD card, if applicable.
For iPhones, turn off find my iPhone, and then sign out of your iCloud account.
Then, start the wipe by going to settings, General, reset, erase, or content and settings.
For Android choose settings and then find the back up and reset option.
However, this may only include data at the application levels so things like SMS and chat messages could be restored.
Try encrypting the phone before doing a factory reset.
You can also find this option from the settings menu.
For a full guide to [UNKNOWN] wiping an Android phone visit CNET.com.
In San Francisco, I'm Lexy Savvides CNET.com for CBS News.