Ah, my naïve little game-guzzling friend: Free games make money by selling you. And the fact that you would ask how they do it just points to how well it's working for them. While you cheerfully crush candy or farm ... villes? ... picture yourself as a little hamster in the wheel of the gaming company. They're using your hard work and dedication to keep the lights on. And they're doing it in a few different ways.
If you were to ask most people how Internet money is made on free sites or games, you'd probably get a confident answer: ads. But when most people are prodded more ("How, exactly, does having a free player look at ads make money?"), the answer might get a little more vague ("Uh, you click them sometimes? I think?"). While some games do use the click model (where advertisers pay the gaming company if someone clicks the ad), there are other games — like "Flappy Bird" — that use a pay-per-view model of ad revenue — meaning that every time someone sees the ad, the company makes dough [source: Chayka].
That's all fine and good for games that have a ton of people playing them. Are ads useful for games that aren't as wildly popular? Well, ads can also make money by disappearing. Many games offer to show you an ad-free experience if you're willing to pay a little bit of cash, and that's great for the gaming company. Obviously, it means that you've paid for the game, but it also means that you might be willing to consider some "micro-transactions" within it.
Micro-transactions are the little things you might pay for within a game to either enhance your experience or make you a better, more competitive player. So let's say you're playing a free game where the object is to make a really good mixed drink. (On the Internet, it's always 5 o'clock somewhere.) You might be able to access a free bevy of inexpensive well liquors, but pay $3 and now you're able to use top-shelf brands or exotic juices to flavor your drinks. Naturally, this makes you a player who is going to get better — say by moving up to higher levels. Which means you're sticking around for longer.
Let's go back to the idea that the game companies are selling you — the free-game player — for money. By having a huge collection of free players, the game guarantees that those who are paying will have an eager, decent pool of people to play against in multiplayer settings. And while I might never agree to fork over money for a game, if my buddy — who willingly buys into an ad-free experience or micro-transactions — tells me to download the game, I'll be a lot more willing to if it's free. That brings in more players, increases ad impressions and helps get the word out.