You would need to sign out of the account you no longer want to have on the one iPhone and log in with the account you want to have on it.
Make sure you select the option to remove iCloud content from the iPhone you are switching to the new account.
Go to Settings ➜ Apple ID, scroll all the way to the bottom, and then tap on Sign Out. Then Sign in with the Apple ID you want to use on it.
A better alternative, is to simply Erase the iPhone, and set it up as new with the Apple ID you want on it, so nothing from the old Apple ID remains on it.
click here ➜ What to do before you sell, give away, or trade in your iPhone or iPad - Apple Support