Often, the answer is subscribers, advertising, and freemium, but other factors are in the mix too. Even with all those options, a lot of these services aren't profitable. Which ones aren't might surprise you. How Do They Make Money has a breakdown of revenue type and profitability of nearly 50 different prominent Internet companies, and lets you arrange them by the kind of income they have, or the service they provide.
It's a neat little distraction, but it's worth noting that the site doesn't cite its sources, so if you're in this for anything more than mild amusement, you're going to have to go vet the facts yourself see here How Do They Make Money