Simply said: How do I turn off iCloud on my Mac?
On my Yosemite machine there is a panel in System Preferences (click the grey apple top left corner) On my system icloud is on the start of the 3rd row.
You will be presented with a bunch of things that you can store in the cloud. iCloud Drive, Photos, Mail,...
Uncheck them all.