The apple account is the master key to using all services and features on your Apple device. Whenever you buy an Apple device, the first thing you need to do is to set up an Apple ID. Now, it is quite possible that you already have an ID thanks to a previously purchased device, but this does not stop you from creating another one with another email id.
Many times, it happens that we buy a new iPhone, while already owning an older model. Some people tend to sell the older one or even hand it down to a sibling or friend. Whatever you choose, the first thing you should always do before giving away an Apple device is to delete your Apple account. This way, all the data synced to your corresponding Apple ID is safe and sound.
Earlier, if you wanted to perform this, you had to connect your iPhone to your Laptop and use iTunes. The problem with this method was that if the USB connection was cut midway, it would end up bricking your device. But now, you can just use your iPhone.