I did this recently. I will endeavor to actually describe the process in some more detail than previous replies.
The equipment: DIY computer with Asus z170 motherboard, intel i7 quadcord CPU
drives: m.2 SSD, 640 gb 7200 rpm Seagate, 1 tb 7200 rpm Western Digital
You have to install Windows first. I installed Windows 10 from a Microsoft thumb drive onto the m.2 SSD.
Next I installed Ubuntu Studio from a live DVD. I downloaded the ISO onto our iMac and burned the ISO onto a DVD using toast.
When booting from live DVD, a crucial point, which may seem obvious to anyone else, but not to me, in BIOS I didn't notice at first, but I was given two different DVD boot options. Only the second one, with "UEFI" in the name, would actually successfully install the darn thing, see below for why***. My BIOS is UEFI.
During this Linux install and subsequent ones, I generally do NOT select any additional options, for example, encrypt home, install third party, etc. This seemed to hang the install.
When the installer gave options to install alongside, or erase the detected OS, I choose "Something else" so that I could set aside hard drive space differently for each OS. For example for Ubuntu Studio, I placed root, swap on the Seagate drive, but put home on the Western Digital Drive, which I actually partitioned into two, one for Windows and one for Linux. The reason for this, I would be doing video editing with Ubuntu Studio, and it is considered better to keep your OS files on a different drive from your data, for better performance.
I was generous, I gave 100 gb for the Ubuntu Studio root.
I designed the boot loader to go onto the m.2 partition labeled UEFI, Windows Boot manager. ***This is where you would go wrong if you didn't boot from the UEFI DVD option, because it wouldn't recognize the partition as UEFI Windows Boot manager.
So this was no problem. Dual boot worked fine, other than some clock issues, which I will describe below.
So now, triple boot. I used a MINT Live DVD created in a similar process as described above. Again, select the UEFI option to boot from in BIOS.
I put the root and swap and home all on the Seagate drive for this one, because I wasn't really concerned about performance or drive space for this particular OS.
Again, I selected the m.2 UEFI partition labeled Windows Boot manager for where to put the boot loader. I have read elsewhere that it is possible to NOT install a second boot loader, but I didn't seem to have that option. Also, it may be possible to put the second boot loader in a different partition? IDK. But, see below for what happened at the end of the quadruple boot****.
The install completed successfully and I booted into MINT no problem. Then....
I think I may have booted into Windows to make sure that would work. After that the boot manager disappeared.
So I ran "boot-repair" from a CD. At the end of the first repair attempt it mentioned creating a separate EFI partition using Gparted and to turn off Secure Boot. So I ended up doing both of these because the first repair attempt didn't fix the boot manager. (Actually, come to think of it, I may have used the Windows disk management to create the EFI partition.)
So I ran boot-repair again, advanced options, and selected the option for separate partition. It didn't allow me to pick the new partition I created, only the original boot partition on the m.2. But somehow this reappeared the boot manager. But the boot manager was a total mess. It listed like ten different boot options, some of which were redundant ("Windows UEFI" AND "Windows boot manager" on the same menu with the same function).
So I had a fully functional triple boot. Getting to this point was a huge time suck frankly because it took me a while to figure out the UEFI DVD boot issue so I took some pause before I went for the quadruple boot. But I wasn't pleased with the boot menu. However, I felt more confident having on hand the boot repair, so went for the quadruple.
So I wanted to install Elementary OS because this appears to be most like the iMac OS; this would be the default OS that my fiancée could use if the iMac was unavailable to her.
Again, a live DVD, pick the UEFI boot DVD option from BIOS. When it asked where to install the boot launcher I picked the Windows Boot Manager partition, not the newly created EFI partition I made earlier.
The install went well, and BONUS, ****the install cleaned up the boot manager list. So something in the installer went ahead and repaired it. Awesome.
Now, the clock....
Apparently with multiple boot Windows and Linux, the BIOS clock will be set by the various OSes to the wrong time. Others have brilliantly explained why this is. The solutions vary.
Pretend like you live in Iceland. This means set your timezone to UTC+0. If you do this, you'll want to set network time to "off" in Windows and Linux. This seemed to work for dual-boot the clock was fine, but not for quadruple boot, not at all.
a solution posted by Muru. This is a less common solution, but the only one that worked for me:
timedatectl | grep local
This command displays how the clock is currently set.
timedatectl set-local-rtc 1
This will make the clock use "local time".
the most common suggestion, but I couldn't get the commands to run at all.
add or change the following section
# set UTC=yes if your hardware clock is set to UTC (GMT)