A few more pedantic details
While most of what has been said about how MS never played fair against OS/2 is quite correct, as are the statement about IBMs fragmented management at the time, there's a little more to it than that.
When Windows came into existence, Microsoft had been collaborating with IBM on OS/2 1.x for some time. This collaboration sprung from the insight that with the advent of the 80286 CPU and Intel's plans for the 80386, DOS had essentially become obsolete. IBM worked mainly on the OS/2 kernel, which in its first incarnation was basically a 16-bit successor to DOS with a command line interface. Microsoft concentrated on the Graphic User Interface (GUI).
The idea for a Graphic User Interface was neither new nor original. Years before, Xerox had demonstrated a mouse-controlled GUI in their Palo Alto Research Center. This demonstration featured the Alto computer, which in 1973 sported a GUI, a mouse, graphic WYSIWYG technology and an Ethernet network interface. The demo was attended by Steve Jobs (Apple) and Bill Gates, among others. Jobs saw the possibilities of the GUI and went on to implement the idea into Apple's OS and application software, while Gates decided to stay with the text-based user interface. Later Gates was forced to revise his opinion about the GUI when it turned out to be successful on the Apple platform. Thus it was decided that OS/2 would have a GUI.
Soon Microsoft's code began to diverge from IBM's (especially from Presentation Manager, then IBM's GUI component of OS/2) and became increasingly incompatible with it. Meanwhile Gary Kildall of Digital Research had already released the first version of GEM, a Graphic Environment Manager for DOS. In order to sabotage this, Microsoft announced that they were working on their own, much better, graphic environment. Eventually they took the GUI portion of what should have become OS/2 and sold it as a separate DOS application which they named MS-Windows. In its initial form it was mainly text based and hardly useful, but MS claimed to work on it in preparation for the upcoming OS/2. In the meantime, application developers (e.g. Word Perfect Corp., Ashton-Tate and Lotus) spent huge R&D budgets on rewriting their applications for OS/2, assuming that the IBM/Microsoft partnership would deliver as promised.
MS-Windows could have been a new start, but (mainly for strategic and marketing reasons) it wasn't. It tightly clung to the mistakes of the past, being based upon the underlying MS-DOS architecture for basic OS functions such as file system access. It added a simple cooperative multitasker to MS-DOS, in a manner strangely like that of DesqView (a multitasker for DOS that had been available from Quarterdeck for years). It also sported a GUI that was so close to the one used by Apple that it kept lawyers occupied for over half a decade. But as far as innovation was concerned, that was it.
Initial versions of Windows were very bad, but Microsoft kept promising that a better product would come out Real Soon Now, still as part of their joint OS/2 efforts with IBM. Until one day, that is, when suddenly they turned their backs on OS/2. They cried "innovation" and went back to DOS in spite of earlier having admitted it to be obsolete. Then they went and dropped out of the collaboration with IBM entirely, taking with them a lot of IBM technology that had ended up in Windows, which they now suddenly positioned as the operating system of the future. They never even mentioned their earlier promises about OS/2 again.
Microsoft already sold applications for the Apple Macintosh. This gave them a good look under the hood of Apple's operating system software, and enabled them to muscle Apple into granting them a license for portions of the MacUI. (They threatened to withdraw all Mac applications, unless Apple would grant them a license to use MacUI code to port Macintosh apps to the PC.) They then raided MacUI for extra ideas. The remaining few bits (e.g. the font technology they later called TrueType) they bought, occasionally bartering vaporware that later failed to materialize. They also threw in a random collection of small applications, completely unrelated to an operating system (e.g. Paintbrush) which they had bought from various sources to flesh things out a bit. The resulting mixed bag of bits and pieces was massaged into an end product and released as Windows 3.0.
It was not too difficult for Microsoft to adapt the Apple versions of Word and Excel to run on Windows 3. There is some indication that Windows was adapted to Word and Excel as much as Word and Excel were adapted to Windows. By the time Windows 3.0 hit the market, competing application developers had already put their R&D money into OS/2 versions of their products, on the assumption that OS/2 would be delivered as promised by the IBM/Microsoft partnership. And now OS/2 did not materialize. But a blown R&D budget was only half the problem. Even if most of the application manufacturers had been wealthy enough to fund two separate development efforts to upgrade their DOS products, there was not enough time to do the Windows version before Windows' projected release date. The fact that the Windows API had not been published in any permanent form yet didn't help either. Without a good API specification, an application developer is not able to interface with the operating system or with other software products. This essentially prevents application development. And Microsoft was the only application vendor at the time who knew enough about the Windows API to come up with market-ready Windows applications.
So Microsoft shipped both an OS and an application suite for it, several months before anyone else in the applications market had a chance to catch up with Microsoft's last-moment switch to Windows - and that was that. All those who had expected to sail with the IBM/Microsoft alliance missed the boat, when Microsoft suddenly and deliberately decided to cast off earlier and in another direction than they had originally promised.
Most of the independent application vendors who had committed themselves to OS/2 never recovered.
IBM eventually went on to release their own version of OS/2, and botched its marketing completely with campaigns revolving around dancing elephants and nuns with pagers. This is partially due to the fact that by the time OS/2 hit the market, that market had already been taken away from them by Microsoft, and IBM never fully realized the extent of the changes that had been wrought upon the market while they weren't looking. Most application developers had irrevocably committed themselves to Windows at that point, and application developers now used Windows development tools which produced code that was extremely hard to port to another OS. Native OS/2 application software remained scarce, and hardware support was even a bigger problem. As a result, most OS/2 users first tried to run Windows applications on OS/2, which often came with quite a few hurdles and problems.
Even so, IBM remains responsible for much of the demise of OS/2. Although it had an infinitely better architecture than Windows, OS/2 was killed off by some of the worst strategic and marketing decisions in the history of the industry. Its brief and unhappy existence was marked by a lack of drivers and hardware support, a lack of development tools, and a lack of native applications. In typical IBM fashion the end user was expected to manually edit a lengthy CONFIG.SYS file (four pages or more of text-based and cryptic configuration items) to configure the system. Partnerships with hardware vendors to ship OS/2 with systems that couldn't run it properly made the problem even worse, and disastrously bad marketing drove the final nail into OS/2's coffin.
After this debacle IBM withdrew from the desktop software market which they had never really understood, in spite of having created the original IBM PC.