How do I remove all my information from my iphone4 so I can give the phone to a friend?

I have a new iphone and would like to give my iphone4 to a friend. How do I remove all contacts, and other saved information from the phone. How do I open the phone? Do I simply remove the sim card? Thanks.
Welcome to iMore! Go to Settings > iCloud, and sign out of Find My iPhone. Then go to Settings > General > Reset > Erase All Content and Settings. This will return your iPhone back to factory defaults.
Also toggle off iMessage.
Also do not forget to remove the device from your Apple ID. There's an option just for that in your account settings for when you either sell the device or give it away.

Original thread: https://forums.imore.com/threads/how-do-i-remove-all-my-information-from-my-iphone4-so-i-can-give-the-phone-to-a-friend.361485/