Every year/release this answer on installing previous versions of macOS will need updating. Last update May 2023.
In the past couple of years - since this answer was first devised - Apple now have an official list of available installers making them much easier to find than before.
So, before working right down this answer, check here as a first step.
Apple Knowledge Base - How to download macOS
One thing that still applies throughout: you really need a Mac to get macOS easily. As all Macs since approximately 2011 can use Internet Recovery to at least get a workable OS on the Mac, this might often be the best initial approach, from which you can investigate further once you have a basic working Mac.
A lot of the info below depends on the age of the Mac you're trying to get an OS onto, whether it currently has a working OS, and the age of any other Mac you can use to attempt this.
Accessing an OS your current Mac cannot itself run….
The App Store will not let you download an OS that is either too old or too new for the Mac you are downloading to - which is an annoying hurdle.
There are several ways to deal with this - all freeware, but with different approaches. All of these only work for High Sierra & newer. They are of no use if you only have an early Mac to work from.
TwoCanoes' MDS solution 'Deploy Stick' [free to use & open source, but without support or automation, which are paid add-ons].
Mist from ninxsoft which can download & build official installers.
dosdude1 Patchers - a suite of apps ostensibly for installing macOS on unsupported hardware, but each of which includes direct download of the relevant OS, & separate download of the firmware update necessary for APFS.
I'm in the process of testing these - reports as they happen
Mist requires macOS 12 [Monterey] to run.
MDS -
v1 requires Sierra to run.
v3.5 to 4.1 will run on Mojave.
v4.3 uses Mist for downloads, so Monterey minimum OS.dosdude's patchers require you obtain your installer separately, except for Catalina, which it can download itself [tested on El Capitan] once downloaded, it offers to either Install to this machine, make a bootable installer, or save an ISO image.
You can only use the dosdude patchers if your Mac can boot from USB. That will be something 2009 or later.
As I have not yet tested alll of these personally, if you hit a stumbling block, please raise a new question and link back to here/leave a comment below, so we can add information to this as a 'master list'.
I have found a list of older OS installers - Snow Leopard to Sierra - which can be accessed using current browsers, or from older versions of Safari which do not support modern https links.
http://maclinks.publicvm.com
It can also be accessed with https
https://maclinks.publicvm.com
This links to official Apple installers, just by an 'easier' route for older Macs.
There are also instructions for each to make bootable installers.
If you are trying to jump a long way - say from 10.8 to 10.14 or later, received wisdom is to first upgrade to El Capitan 10.11, then High Sierra 10.13.
This will prepare your machine for the long jump.
Some users seem to have managed to skip El Capitan, but High Sierra is still necessary, if it or newer has never been on the Mac before, as it adds a firmware update required to read the newer APFS filesystem.
If you need to create a bootable USB to install from
How do I make a bootable USB OS X installer on a Mac?
How do I create an OS X 10.9 (Mavericks) bootable USB drive using Windows?
*There's a slightly different version of one of those methods, covering executable permissions, at Error installing Sierra after formatting HD
Recovery Options
If you need to reinstall from Recovery on an Intel-based Mac, & were previously running Sierra 10.12.4 or higher, there are now 3 options available.
Hold the appropriate key combo at the boot chimes...
- Cmd ⌘ R
reinstall the latest macOS that was installed on your Mac, without upgrading to a later version [this relies on your Recovery drive being intact & bootable.] - Opt ⌥ Cmd ⌘ R
upgrade to the latest macOS that is compatible with your Mac - Shift ⇧ Opt ⌥ Cmd ⌘ R
reinstall the macOS that came with your Mac, or the version nearest to it that is still available.
The first 2 options are available to any Mac newer than Lion, approximately 2009.
Should you have access to an older point release of any OS, 10.11.0 etc & wish to upgrade, then you can download Combo Updaters from Apple that contain everything necessary to go straight to the latest point release in a single step, e.g. 10.11.6
Google is good at finding these, as the top hit if you just search combo update 10.11
etc but here are links to a few
Mavericks 10.9.5
Yosemite 10.10.5
El Capitan 10.11.6
Sierra 10.12.6
High Sierra 10.13.6
Mojave 10.14.6
Catalina 10.15.7
Since Big Sur, Apple have stopped making combo updaters. Big Sur.
If none of these methods are available to you, you have two options
Find a friend who can access the download [recommended]
Find a torrent/sharing site [not recommended]
Note: You can not use a Time Machine backup to revert to an OS which is older than the OS of the latest backup on that Time Machine drive.
This means that to preserve your ability to ever restore to an earlier backup & OS with your Time Machine backup, you must swap out that Time Machine drive before upgrading the OS. This is because once the Time Machine drive sees the new OS, there's no going back to the older OS using it. You can still pick data out from the Time Machine manually, but cannot use it to restore to the older OS.
Some test results:-
Building Big Sur USB stick from MDS 4.1 on Mojave - successful
Building High Sierra USB stick from MDS 4.1 on Mojave - successful
Building Big Sur USB stick from MDS 4.3 on M1 Ventura - successful Building High Sierra USB stick from MDS 4.3 on M1 Ventura - FAIL
It seems Big Sur is the 'break-point' for building on an M1 Mac.