I'm not a huge fan of Apple (the company or its products). I think they charge too much for the limited feature set, and lock their hardware down too much.
But their strategy to make Microsoft irrelevant was very well executed.
Here's what happened:
In the past, Microsoft was very profitable because lots of people bought new desktops every few years, paying a tax for the OS (WIndows) and frequently the productivity software (Office). Maintaining a high level of backwards compability was key to Microsoft's success- as was their relationship with software developers. As laptops have become to replace desktops, Microsoft successfully translated their strategy to that hardware form factor.
Steve Jobs figured this out painfully by marketing Apple desktop products. Of all the Microsoft competitors, only Apple had any real market share. He took this knowledge and came up with a strategy:
Instead of attempting to fight Microsoft in its home turf market, he created an entirely new market: small form factor, no-keyboard, no-mouse devices running a limited operating system. Microsoft and others tried to create this market before, but having used their systems, it was obvious why they didn't succeed (hard drives and stylus). This market has, in a short 6-7 years, eclipsed the desktop market and laptop market in terms of revenue (the profit margins are much smaller).
One of the key observations that Jobs made, and applied, was that "large, high surface area Operating Systems" (like Windows, which has a huge resource footprint and API) would lead to crappy applications. In making iOS a developer platform, the true genius was making a tiny API surface area, and ruthless resource management. This means applications are predictably fast, and it's easy for Apple to update their functionality over time without getting in the massive backwards compatibility trap, by pushing the effort onto developers, who are incentivized by user payment to make their apps run on as many platforms as possible.
Android picked up on this idea as well, and both Apple and Google have expanded the market for computing (while also reducing the old markets) much more rapidly than Microsoft could. One of the best examples of this is Windows 8- they made it "a tablet OS". Actually, it's neither a tablet OS or a desktop OS- it does poorly. It's the sort of thing a hapless product manager commanded by Ballmer to make a "tablet OS", while also ensuring that Windows 8 still ran on the millions of remaining desktops.
At this point, Microsoft has only two remaining markets:
1) enterprise server and cloud
2) enterprise productivity software.
I expect them to slide, slowly, burning down their remaining cash as the market gets smaller. The only bit of IP MSFT continues to own that matters is the parsers for the Office file formats.