Logging out of iCloud on iPhone is incredibly simple, as this feature is integrated directly in the Settings of the device. If you don't know how to sign out of iCloud on iPhone, follow the instructions in the article below by Mytour.
3 Simple Steps to Log Out of iCloud on iPhone
How to Exit iCloud on iPhone, Log Out of iCloud
Step 1: On your iPhone, access the Settings function -> Navigate to the Apple ID currently logged in on the device.
Step 2: Scroll down, find and select Sign Out -> A small window with the Apple ID password will appear; then, enter the Apple ID password -> Click Turn Off
Step 3: In the next window, if you want to keep information on the iPhone such as: Keychain, contacts, calendar, reminders, or Safari browser when signing out of iCloud, slide the circle to the right at the corresponding option. Once set, click Sign Out -> A confirmation message will appear, click Sign Out again to confirm exiting iCloud on iPhone, or in other words, signing out of iCloud on iPhone.
The Mytour article above has guided you on how to exit iCloud on iPhone, log out of iCloud on iPhone. Additionally, if you need to change the password for this account, you can refer to the guide on Change iCloud Password to proceed.
Wishing you success in following the above steps.