iCloud requires OS X Lion (10.7.5) or higher. If you're running 10.5.8, you would have to purchase a Mac OS X 10.6 DVD from the online Apple Store, then get the 10.6.8 combo installer: http://support.apple.com/kb/DL1399. Then from 10.6.8 you will need to upgrade to either Lion higher in order to set up iCloud on your Mac. First check to see if your system meets the system requirements to upgrade.
Lion system requirements are:
- Mac computer with an Intel Core 2 Duo, Core i3, Core i5, Core i7, or Xeon processor
- 2GB of memory
- OS X v10.6.6 or later (v10.6.8 recommended)
- 7GB of available space
Mountain Lion requirements are shown here: http://support.apple.com/kb/HT5444.
Mavericks requirements are shown here: http://support.apple.com/kb/HT5842.
If you can run Mavericks, you can purchase an upgrade from the Mac App Store. If you can only run Lion or Mountain Lion, contact the online store in your country and purchase a redemption code to download it from the Mac App Store.
After upgrading, you will find iCloud in System Preferences>iCloud on your Mac, and can set it up as explained here:http://www.apple.com/icloud/setup/mac.html.
Before upgrading, you may want to check the compatibility of your existing programs by checking here: http://roaringapps.com/apps:table.