A few minor corrections to what others have posted.
First of all, Microsoft used to have two “windows” products. They started off with “windows”, which was windows 1.0, 2.0, and 3.0. At that point, they realized that they needed a structural change to the operating system for it to be stable enough to be used in a networked type of environment, so they came out with “NT”.
NT and Windows use similar API calls, but are structurally different from the ground up. Windows is basically backwards compatible to DOS. In fact, the earlier versions not only booted from DOS but they kept DOS around and intact, hidden underneath the scenes. Even the later versions of windows (95, 98, and ME) still had the ability to use DOS device drivers. If you ever saw a disk drive in “DOS compatibility mode”, that’s what was going on.
NT did not have DOS underneath of it. In fact, it specifically had a layer separating the programs from the hardware (called the Hardware Abstraction Layer, or HAL), making DOS style direct hardware accesses impossible. This was great for stability, but it sucked eggs as far as backwards compatibility was concerned, and it had all of the performance of a slug carrying lead weights. Instead of your program changing part of your screen, the program had to ask HAL to change part of your screen. Then HAL had to do it, and then tell your program that it did it. In those days, this kind of performance hit was unacceptable for games and such, so Microsoft advertised NT for businesses and the good old fashioned Windows for home users.
Fast forward a bit, and microsoft gets sick and tired of maintaining two operating systems. They want to force everyone to NT. So, they announce that they are doing exactly that, starting with this next version of NT which they end up calling Windows 2000. They get about half way through testing, and realize there is just way too many home applications that still won’t run on NT, and their customers are going to throw a fit. So, they change course mid-stream, and announce that 2000 is for business users. You can still see some remnants of their original strategy in 2000, such as the enhanced media stuff that obviously is of little value to a business user, and the cutesy “my network places” instead of “network neighborhood”. But now microsoft doesn’t have an OS to sell to their home users. So, they take a bunch of the stuff they developed for 2000, shove it into windows 98, do some minimal testing on it and throw it out the door, calling it Windows ME. And, because they did such a rush job on the thing, it sucks major donkey balls. Eventually they get it patched up to the point where it is decent, but for a while you were much better off running 98 than ME.
Microsoft tries again for XP. By now, software developers are all very much aware that Microsoft is killing off the windows line and is moving everyone to NT whether they like it or not, so ever since 2000 and ME came out, software developers have all been making NT compatible programs. They also try some tweaks to NT, giving it some more compatibility mode, but these are of fairly limited use. Underneath the hood, XP is basically 2000, but for everything that the user sees, it is a major overhaul. XP wasn’t a whole new OS, even though it was advertised as such. XP was really 2000 with a facelift, and doesn’t really run older programs any better than 2000 did. However, since programmers have all moved to NT, Microsoft successfully completes their “merge”, and the windows line is officially dead.
Vista’s development was rather troublesome. It was originally code named “longhorn” and they had some very ambitious plans. Unfortunately, they got part way through development and realized a lot of their ambitious plans ended up being huge gaping security holes that couldn’t be fixed, so they started dropping these features. For a while, some folks were calling it “shorthorn” instead of “longhorn” because of its lack of features. Microsoft ended up shoving a bunch of stuff in there and throwing the thing out the door, basically taking the stance that they ruled the world and we were going to move to their new big thing no matter what we thought. They got a bit too arrogant, and when folks discovered that Vista wouldn’t run on their software and was too much of a resource hog to run on their hardware, their customers revolted. Windows 7, despite its name and the huge amount of advertising Microsoft is doing to the contrary, isn’t a complete new OS from the ground up. It’s basically Vista with all of the crap that everyone complained about fixed, which is actually a good thing.
If you don’t count minor version numbers, then 2000 and XP are both NT 5, and Vista and 7 are both NT 6. There are enough differences between them though that I think you really do want to count them.
Here’s the way it ends up. I’m sure I’m missing a few since this is from memory, but this is the basic idea:
“Windows” operating systems:
1.0
2.0
3.0
3.1
4.0 (Windows 95)
4.1 (Windows 98)
4.9 (Windows ME)
“NT” operating systems:
3.51
4.0
5.0 (Windows 2000)
5.1 (Windows XP)
6.0 (Vista)
6.1 (Windows 7)
Microsoft also has embedded and compact versions of windows, which run things like ATM machines (yes, I know, redundant), airport displays, and all sorts of stuff.
“Windows 7” doesn’t make any sense according to any way that you number them. They mostly chose the name as “let’s get as far away from Vista as possible”, even though underneath the hood, most of Windows 7 is Vista.