I always had this question in mind but couldn't find a proper place to ask. There are some really nice and great open source free software available on the net. How do these products sustain themselves financially? It is one thing writing a small utility which does something nice but writing a complicated product with whole lot of features is a totally different ball game. So to repeat myself again, how do they work financially?
There's lots of different answers.
Some projects are maintained by people who just want to do it for assorted reasons, including prestige or the knowledge that they're doing something good or because they thought somebody had to do it and nobody else was. This section is almost certainly not as large as it was.
Some projects are maintained by people who want to be paid for support and the like. Most Open Source companies are like that: they want to create a popular product for free so that they can charge for related things. It's a form of advertising.
Some projects are maintained by companies who aren't in that exact business. Quite a few companies benefit from being able to use Linux, for example, or Apache, because they then have access to high-quality software that they don't have to write all themselves.
Suppose your company wants to sell web servers. You want to have as much of the customers' money going to you as possible. If you sell them Windows-based servers with IIS, a chunk of that money is going to Microsoft. If you sell them Linux-based servers with Apache, you get to keep that money, and you have a lot more control over what you sell. That may well be worth donating resources to assorted projects. (Obviously, Microsoft has the opposite opinion. They'd like the server people to produce cheap hardware that runs Windows and IIS. Microsoft is likely the company most inherently opposed to Open Source, but even they take advantage of it in some ways.)
Let's look at Apple's use. Apple makes their money selling hardware, but the main distinguishing feature is their ability to make user interfaces. The iPhone does nothing previous smart phones didn't do, it's just a lot easier to use, and so it sold millions really fast and redefined the market. They have a good idea as to what they're selling. Nobody's going to buy Apple for operating internals, so by having the Darwin part of the OS as Open Source they can get some outside help on it. They also started with Open Source after failing to produce a top-quality operating system themselves. Nobody's going to buy Apple for the printer software, so it was easier and faster to use CUPS. They will for the interface, so that's closed down tight.
Here's one potential way: support. Support can be a money-maker.
Linux distros are "free", but there are training costs to companies as most employees won't be familiar with the technologies. So consultancy becomes a viable source of income for open-source projects.
A real-world example: the company I work for wanted to introduce automated acceptance testing (using tools like selenium, fitnesse, fitsharp etc.) The tools are all free, but to implement them in an effective way is not that straightforward. So a consultant (somebody who actually developed these tools) was brought in to suggest the best ways to implement them.
I'm sure other answers will give other ways that open source projects can sustain themselves, this is just one way...
Even though this is an old question, I don't see the most obvious answer to me - dual-licensing. Many successful open-source projects offer more than one version of their product - the core being released under open-source and premium editions offered under commercial licenses (this model is often called freemium pricing).
Good examples of such projects include MySQL and Magento. I wrote extensively on the subject of making money from open-source on my company blog, might be of interest.
If a project is popular then donations can help offset some of the costs or even make money. Its most likely not going to be much unless the audience is huge, but its enough to pay for webhosting or a few bills.
In the long run its for pay support or consultancy. Ubuntu is completely open source, but Canonical provides enterprise level support and consultancy for it and makes decent money from it. The issue with this though is that your project has to be large enough for enough people to want to migrate or setup software to yours.
Getting to the point of making money can take years of building a consumer base and lots of hard work.
If you develop OSS with a strong copyleft licence (GPL or AGPL), you can then charge for exceptions to that licence, allowing people to include your code in their proprietary products. If you use a more permissive license (X11, Apache, MPL), they can include your code in their product anyway, so you have nothing to sell them.
This is the key: http://www.codinghorror.com/blog/2010/06/the-vast-and-endless-sea.html
The thing that business people do not understand. You have a bunch of good developers, who really get all of the intrinsic motivators you could get. You don't have to pay the whole infrastructure a commercial product comes with (an enterprise with a lot of people not needed to create the product, such as administration, lawyers, marketing, advertisement, etc.). Some projects actually generate enough income (through donations, commercial support/licences), but that's rather rare. And then there are a few projects which are basically open sourced because it makes them much cheaper to maintain, or because they couldn't be sold.
Spare time? Some people are simply able to manage their time so that they have spare time outside of their job hours. You don't have to make money off of every single thing you do. If you worked for a living fixing roofs, you wouldn't expect someone to pay you to patch your own roof if it was leaking, would you?
Furthermore, a lot of large open source projects turn into companies that find creative was to make money. Selling support, merchandise, extra unnecessary features. There are lots of ways to make money off of open source.
Also, some Open Source projects gather very large teams of people with very different circumstances. People that can be active in the project at different times, making the project very active.