Nokia's had a tough go of it the last few years, losing tons of market share in both the high end (to Apple and Google) and the low end (to Chinese manufacturers). Now, they're giving up on running their own mobile OS and are going to Start Selling Windows phones.
It makes a certain amount of sense for both companies. Microsoft is way behind Apple and Google in getting their OS to market, so having a big hardware manufacturer on board will help get their phones out there. And Nokia can now focus on hardware instead of dedicating resources to an OS that nobody uses. We'll see how it all turns out.