If you're using a PowerPC Mac, none.
If you're using an Intel Mac, buy a Mac OS X 10.6 DVD from the online Apple Store and update to 10.6.8.
If you're using an Intel Mac with a Core 2 Duo(not Core Duo) or better CPU and at least 2GB RAM, after following the instructions above, buy Mountain Lion from the Mac App Store. If it reports that the computer is incompatible with it, phone the online Apple Store and order a download code for 10.7.
Start by checking if you can run Snow Leopard:
Requirements for OS X 10.6 'Snow Leopard'
OS 10.6 Snow Leopard is once again available from the Apple Store:
and in the UK:
but nobody knows for how long it will be available.
To use iCloud you have to upgrade all the way to Mountain Lion:
You can also purchase the code to use to download Lion (Lion requires an Intel-based Mac with a Core 2 Duo, i3, i5, i7 or Xeon processor and 2GB of RAM, running the latest version of Snow Leopard), or you can purchase Mountain Lion from the App Store - if you can run that:
When you have installed it, run Software Update to download and install the latest updates for Snow Leopard.