How to sign out of my Apple ID or iCloud login before selling my iPhone

You need to sign out of your Apple ID otherwise the phone's new user won't be able to create their own. Also, your ID carries a lot of your settings and information.

Go to your Settings.

iPhone Settings

Select Apple ID.

iPhone Apple ID

Scroll to the bottom, then select "Sign Out". To clear up definitions, your iCloud login is the same thing as you Apple ID.

iPhone Apple Account Sign Out

Other How-Tos related to iPhone