Usually, you want to be running the latest version of macOS, which at this moment is 10.12 Sierra (version 10.12.3), available for free from the Mac App Store.
But, sometimes, for one reason or another, you might want to install an older version of macOS. Here’s how you get them, and some of the less obvious reasons you might want to use them, or not use them. However, anything before version 10.9 Mavericks is effectively obsolete for daily use, due to lack of support by any of the major browsers.
If you want to turn any of the downloaded versions (10.7 Lion or later) into a stand-alone installer disk that can boot another computer, see DiskMaker X.
- 10.6 Snow Leopard: $20 DVD from Apple Store online. Reasons to get it: Necessary first step in upgrading a computer from 10.5 Leopard to something more recent, because it’s the first version os the OS with the Mac App Store (after you run its updates). Last version of macOS to run PowerPC apps, which are quite old at this point. Last version of macOS to run on computers that have a Core Solo or Core Duo processor (Early 2006 MacBook/iMac/Mac mini, Mid 2006 iMac). Will not work with iCloud at all.
- 10.7 Lion: $20 download from Apple Store online. (If you previously downloaded it when it was available, you can still do so from the Purchases tab in the Mac App Store on a computer running Lion or older.) Reasons to get it: Necessary first step in upgrading a computer from 10.6 Snow Leopard to Sierra to 10.12 Sierra. Last version of macOS that will run on computers with 32-bit EFI (i.e. machines that are not on this list).
- 10.8 Mountain Lion: $20 download from Apple Store online. (If you previously downloaded it when it was available, you can still do so from the Purchases tab in the Mac App Store on a computer running Lion or older.) Reasons to use it: none, given lack of browser support; possibly useful for software which has compatibility problems with newer versions. Last version of macOS that performs well on conventional spinning hard drives (as opposed to solid state drives).
- 10.9 Mavericks: no longer available, unless you previously downloaded it when it was available; if you did, you can get it from the Purchases tab in the Mac App Store on a computer running Mavericks or older. Reasons to use it: for the moment, most important software still supports it, and it still performs better on conventional spinning hard drives (as opposed to solid state drives) than newer versions. Some iCloud features such will not work with current versions of iOS, such as iCloud Drive, iCloud Photo Library, and Notes. Unlike previous versions, Mavericks can sign into Google accounts, though not Yahoo accounts.
- 10.10 Yosemite: no longer available, unless you previously downloaded it when it was available; if you did, you can get it from the Purchases tab in the Mac App Store on a computer running Yosemite or older. Reasons to use it: none that I can think of, except perhaps full iCloud compatibility with very old iOS devices that can’t run iOS 9. iCloud Notes will not sync with current versions of iOS.
- 10.11 El Capitan: available for free download, as explained here, (If you previously downloaded it when it was available, you can still do so from the Purchases tab in the Mac App Store on a computer running El Capitan or older.) Reasons to use it: if you have a Mac that can run 10.12 Sierra, then there’s no reason not to upgrade to that, unless you use Word 2008. If your Mac can’t run Sierra, then El Capitan is still a fully supported operating system that supports all current iCloud features. Unlike previous versions, El Capitan can sign into Yahoo accounts. Last version of macOS to run on older machines supported by Mountain Lion, or which Apple Java 6, which might be required by older software, and has no known issues with Office 2008.