How can I turn off iCloud?
In your system settings go to iCloud and make sure you have all of the switches set to off.  If you have any other devices (iPad, iPhone) do the same.  Open Mail, iTunes, Messages, etc.. all the default apps, and make sure your settings are disabled in each.

In this article, it's mentioned, that this may be a bug with OSX and by clearing all your cache and then turning the switches all on, saving, and off again may resolve the issue.

Running this command in terminal will disable applications from like Textedit from trying to save to iCloud by default:

defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool FALSE


and this command should disable the iCloud prompt when you login

sudo defaults write "/System/Library/User Template/Non_localized/Library/Preferences/com.apple.SetupAssistant" DidSeeCloudSetup -bool TRUE


(Note the quotes are required since one of the pathname components, "User Template", has an embedded space.)