"Unix" is a trademark for an operating system that was inspired by the 1960s-vintage operating system named "Multics"; "Unix" was a wordplay meant to suggest that it was like Multics, but not as complicated. (Personal note: In the late 1980s, I worked on a commercialized descendant of Multics that was not a type of Unix.) Development of Unix began in 1969 on a DEC PDP-7, and moved to a PDP-11 in 1970. In 1972, it was rewritten in C; to that point it had been written in assembly language. (DEC assembly language was relatively programmer-friendly, but it was still assembly language.) It remained mostly a Bell Labs research project through what was known as "Version 7", which was released in 1979.
Along the way, circa 1977, an alternate branch developed: "BSD" (Berkeley Software Distribution). AT&T licensed a commercial version of its branch, "System III", in 1982, and then "System V" in 1983. Then there was a bunch of legal fighting between AT&T and Berkeley, which hurt both, until the lawsuit was eventually settled.
Partly in response to the battles over System V and BSD, two new projects began: Minix (by Andrew Tanenbaum, which replicated the key features of existing Unix-family kernels, with a micro-kernel design) and the GNU project (which replicated most of the important non-kernel parts of existing Unix), both with entirely new code that avoided the legal troubles between System V and BSD. Standardization efforts tried to resolve the differences between the two main branches; the main result was POSIX.
In 1991 – inspired by Minix, older Unix branches, and the absence of progress on a GNU kernel – Linus Torvalds created Linux. It was also all new code, and returned to the old-Unix type of kernel rather than the Minix-type micro-kernel.
In 1997, Apple took over the BSD-based Nextstep, and eventually developed it into a new Mac operating system, and adapted it to other Apple devices.
Linux exists in a variety of distributions, which are packages that include a Linux kernel and assorted utilities. Debian was one distribution of Linux, and it has branched into a family of distributions. Ubuntu is a distribution that is part of the Debian family, and it has in turn branched into a family of distributions.
Windows and DOS have a very different history. Circa 1963, DEC built the PDP-6, which had an operating system named Monitor. When they built the PDP-10, they named the operating system "TOPS-10". Gary Kildall wrote an operating system for Intel 8080-family computers and named it "CP/M"; it was inspired by TOPS-10. CP/M inspired "86-DOS", written for 8086-family machines by Tim Paterson (using Microsoft's "Standalone Disk BASIC-86" 8-bit FAT filesystem), because CP/M-86, the 8086-family sequel to CP/M, was delayed.
IBM wanted to license CP/M-86 for its first 8088 machine, but there were problems with the deal. IBM had heard of 86-DOS, and asked Microsoft to get it for them. Microsoft licensed it (and later bought it), and licensed it to IBM as "PC-DOS" – and licensed it to others as "MS-DOS".
Some time later, inspired by Visi On (which was in turn inspired by the Xerox Star, better known as the inspiration for Apple's Lisa and Macintosh), Microsoft developed Windows as an add-on to MS-DOS. Early versions were not very successful, but eventually Windows 3.0 was good enough for commercial success. Several later versions (3.1, 3.11, 95, 98, and ME) all ran on DOS, but Microsoft recognized that DOS was holding back progress on Windows. Near the end, much of that branch of Windows was 32-bit, but it still depended on 16-bit DOS.
In an attempt to get around the limitations of DOS, Microsoft worked with IBM on OS/2, which was meant to be "Better DOS than DOS, and better Windows than Windows". Initial versions were not much good, however, and eventually IBM and Microsoft ended joint development. IBM took it over, and ended up making a pretty good OS/2.
Meanwhile, DEC created the VAX series of computers to replace its PDP-11 line, and the VMS operating system to run on it. It shared some history with the TOPS-10 operating system, but they weren't mutually compatible.
Hedging against the possibility of problems with OS/2, Microsoft hired a bunch of top VMS developers (and some micro-kernel researchers) to build a new, 32-bit Windows, from scratch. Deep down, it resembled a micro-kernel adaptation of the best features of VMS. On top, it looked like Windows. The first release of 32-bit Windows was "Windows NT 3.1", followed by Windows NT 3.5, 3.51, and 4.0, then Windows 2000 (without the "NT"), XP (the first 64-bit Windows), Vista, 7, 8, and 8.1.
One interesting thread tying those mostly-unconnected development paths together is DEC. A lot of early Unix history was tied to DEC the PDP-7, PDP-11, and VAX. The DEC PDP-6 and PDP-10 inspired some DOS prehistory. And veterans of DEC's VAX-VMS team built the core of the Windows NT family.