If you use iOS 10.2 or earlier:Go to Settings > iCloud.Scroll down and tap Sign Out.Tap Sign Out.Tap Delete from My iPhone.Tap Keep or Delete for data on your iOS device, such as iCloud calendars, Safari data, reminders, and contacts.Enter your Apple ID password, and tap Turn Off.
read more >>