First, why it's so popular.
IBM decided to get into the micro computer market when they were in trouble in their large computer system sales which had begun to sell less well than formerly. They decided to do a very un-IBMish thing, partly because they were in a hurry, and use 3rd party products for both the CPU and the operating system. They asked Motorola about their new 68000 CPU, but Motorola couldn't promise to deliver enough chips to meet IBM's needs, so they went to Intel who were quite eager to get the business. They promised delivery of their 8088/8086 CPU just as IBM projected their needs. IBM chose the 8-bit bus (to memory and I/O) version (8088) for their new machine.
Next they went to Digital Research, who had produced CP/M for the Intel 8080 (or Zilog Z-80) chips. For various reasons (shrouded in amusing legend), Digital Research was unable to satisfy IBM's demands, so they proceeded to Seattle. They had planned to ask Microsoft to develop a BASIC interpreter for their new machine all along (it was Microsoft's primary business then), but also asked about an operating system. Microsoft had licensed a locally developed (by Tim Paterson at Seattle Computer Products) variant of CP/M for the Intel 8088/8086 CPU, and IBM bought it. With few, and minor changes, this was DOS 1.0.
DOS was priced so that it was the choice (of the three OS offered) for most buyers of IBM PCs with disk drives and not long after, for IBM PC clones from other companies. Microsoft had retained the right to sell DOS to other computer makers, and it made deals with most which gave them large discounts on DOS (and sometimes other Microsoft products) if companies purchased a DOS license for each computer they produced, regardless of whether they installed DOS on every one of those machines or not. Competing operating system vendors were frozen out.
Eventually the Federal Government sued under the antitrust laws, but the Clinton administration left office before the suit was fully settled. The Bush administration found a way to let Microsoft off with what was essentially a slap on the wrist. In Europe, similar proceedings resulted in a US$660 million dollar fine.
That's why DOS/Windows are the most popular. It's history and very savvy business operations; it is not any superior technical quality.
=============
Second, why it's so insecure.
In the years since DOS was introduced, Microsoft has attempted to find something better (ie, more secure, etc) several times. It licensed Unix from AT&T (calling it Xenix), it developed OS/2 (which was to have been called DOS 5), it developed Windows as a GUI layer on top of DOS, and it developed Windows NT (now called Windows 2000 at ver 5.0). Microsoft never adapted Xenix to run on the smaller machines available in the early to mid 80s and so it sold poorly; it was sold to SCO a few years ago. Windows worked very poorly, partly for the same reason of reluctance to adapt to CPU characteristics, in its early versions. Only with the introduction of machines based on the Intel 80386, and Windows 3.0 did Windows become a significant operating system product in the market. OS/2 was turned over to IBM as part of the famous business 'divorce' between Microsoft and IBM in the mid 80s. The NT project used a team of ex-DEC engineers and produced what was claimed to be a very advanced OS, at least internally. Microsoft adapted existing software (eg, Outlook, Office, Excel, ...) to run on the new operating system, and they brought with them their security vulnerabilities. So NT has suffered from many of the same deliberate design decisions which had made earlier releases of Windows so insecure.
Throughout DOS/Windows' existence, Microsoft has followed a deliberate policy of providing features for customers, without much regard for the consequences (security, virus vulnerability, etc). The result is a very large feature set within and between Microsoft products, some of which are very poorly designed from a security perspective; and some of that insecurity is built into the fundamental internals of much of that software. Some of those design decisions cannot be easily reversed without breaking much existing software, which leaves all Windows users with substanial exposure.
Third party products (eg, firewalls, virus scanners, spyware etection and elimination, ...) can plug some of the gap, but proper configuration is not easy and requires more technical knowledge than most people have.
It is said that the new release of Windows (to be called Vista, and formerly called Longhorn and now several years late) will be a major improvement on this situation. Bill Gates has publicly declared security Job 1 at least twice in the past few years. Perhaps we will finally see an improvement?
===========
Altenatives -- then and now
Digital Research finally decided that DOS wold be the dominant operating system for the IBM PC type machines and that CP/M-86, their own operating system, had little future. So they developed DR DOS, whcih worked better than DOS itslef in most respects. But Microsoft was able to muscle computer makers out of including DR DOS, claimed it was incompatible and would break software applications, and so on. DR DOS didn't get very far in ters of market share.
In the early days of DOS/Windows, when Windows was a loudly barking dog with minimal sales, Digital Research produced a perfectly reasonable windowing system called GEM, running with DR DOS. It had all the features since become standard, point and click, mouse pointer, icons, ... And it ran well on 286 type machines and acceptably on well engineered 8086 machines. Microsoft managed to 'out compete' it on the most common hardware platforms, and Digital Research has long been defunct.
Early in the 80s, a programmer and visionary named Richard Stallman started a project in Boston whose intent was to produce an open source version of Unix, including all of Unix tools: compilers, utilities, networking, ... In 1991, a Finnish graduate student, Linus Torvalds, bought an IBM PC type 386 machine and decided to develop a version of Unix for it since none was available at a price he could afford. That project, now called Linux, is still active, Linus is still in charge of the core kernel part of it, and it's now a full-fledged opearting system. With the GNU tools from Stallman's Free Software Foundation, and contributions from many others, it's now a more than adequate system. All open source, and free (as in liberty, not quite as in beer).
'Distributions' are prepared by various folks (ie, collecting the core kernel, and lots of additional software) and made available. On CD or DVD, they're usually around US$70 in a box with printed manuals and a few months of telephone support. The most influential distributions are SuSE (now owned by Novell, and my favorite), Red Hat / Fedora, Mandriva, Debian (a purely volunteer effort and non-profit), Slackware (the oldest distribution still under way; largely managed by one person), and so on.
All, or almost all, are free to download from the Internet, or copy from a friend's CDs. This operating system is the biggest challenge to Windows since Windows 3.0 was released.
Linux is technically superior to Windows, has all the appropriate GUI toys (mouse, point and click, icons, ...), and more than enough high quality applications (eg, word processing, presentation software, spreadsheets, mail clients, planning software, photo manipulation software, and so on and so on). It is far less insecure than Windows (vastly fewer viruses and such), and there are ordinary installations which have been running continuously for years. At last count, most of the top ten fastest computer installations in the world are Linux based.
For those who would like to experiment with Linux/Unix, Cygnus (now part of Red Hat) has produced a collection of Unix type software which will run under Windows ("Cygwin"), and Bell Labs has done something similar with "Uwin". Both are freely downloadable. You can get your toe wet without much risk with either of these. Or you can get the most recent version of Knoppix (from Klaus Knopper and friends) and run a full Linux distribution from your CD drive -- it won't touch your hard disk at all.
Ask at your local user group about getting copies, or see such online places as CheapBytes. Try Linux.org as a starting point; there are links to most everything Linux, eventually. The Linux Documentation Project has produced many volumes of documentation, all of it free and ready to download. Or it may come on your distribution; a recent version of SuSE had the entire LDP doc set on one of the CDs.
There are, finally, alternatives to Windows which Microsoft's marketing muscle can't bulldoze out of existence.