Step 1. Open Apple menu
Click the Apple logo in the upper-left corner of the screen. After that, a drop-down menu will be displayed.

Step 2. Click System Preferences…
It's at the top of the drop-down menu. After that, the “System Preferences” window will be displayed.

Step 3. Click
"iCloud".
This option is indicated by the cloud icon on the left side of the window. After that, the “iCloud” window will be displayed.

Step 4. Click Sign Out
It's a blue button on the left side of the "iCloud" window.

Step 5. Select the data you want to save
Check the box next to each piece of content (eg " Contacts ") that you want to save a copy of to your computer.
If you want to delete all data, make sure every box on this page is unchecked

Step 6. Click Keep a Copy
It's a blue button at the bottom of the window. After that, a copy of the selected data will be sent to your Mac computer and you will be signed out of your iCloud account.
You may also be asked to save or delete your iCloud account password from your Mac computer. If so, click " Keep on This Mac ” to save password or click button “ Delete ” to delete it.
Method 2 of 3: Via Windows Computer

Step 1. Open the “Start” menu
Click the Windows logo that appears in the lower-left corner of the screen.

Step 2. Type in icloud
After that, your computer will search for the iCloud app.

Step 3. Click
"iCloud".
The app with this cloud icon appears at the top of the “Start” window. After that, the iCloud app will be opened.

Step 4. Click Sign out
It's in the lower-left corner of the "iCloud" window
If you're prompted to enter your Apple ID when the program window opens, you're already signed out of your account

Step 5. Click Delete from PC when prompted
After that, all iCloud data will be deleted from the computer and you will be logged out of your account.
It may take a few minutes for you to sign out of your iCloud account
Method 3 of 3: Via iPhone or iPad

Step 1. Open the settings menu (“Settings”)
Tap on the settings app (“Settings”) marked by the gray gear icon. Usually, this icon is displayed on the device's home screen.

Step 2. Touch Apple ID
This business card is at the top of the screen.

Step 3. Swipe the screen and tap Sign Out
This option is at the bottom of the page.

Step 4. Enter the Apple ID password
Type in the password you use to sign in to your Apple ID account.

Step 5. Touch Turn Off
It's at the bottom of the "Apple ID Password" box. After that, the "Find My iPhone" feature will be turned off on the devices that have the iCloud account currently in use.

Step 6. Select the data you want to save to your iPhone or iPad
To keep a copy of the data that's in your iCloud account (e.g. contacts, calendars, etc.), tap the white "Off" switch
which is to the right of each content you want to save. Touched switch will change color to green
To delete all iCloud data from your device, make sure that all buttons or toggles are in the “Off” (white) position

Step 7. Touch Sign Out
It's in the upper-right corner of the screen.

Step 8. Touch Sign Out when prompted
With this option, you confirm your choice to sign out of your account and disable iCloud on your iPhone or iPad.