This is not a detailed how-to step-by-step guide for how you can earn money online, it's just an overview of some(not all) methods that people use. If you're curious as to how people earn money, or would like to give it a try yourself, go ahead and read.
Affiliate marketing is more or less freelance marketing, they give you a URL with tracking information, leading to their website, if anyone goes to the site via your link and buys something you'll get a comission based on the cost of the product, usually a few percentage for physical goods, up to 75% or even more for digital products, some with a recurrent payment. Often used on a promotional or (potentially fake)review website.
Advertisements such as Adsense, it can be used on your own site, or via various article repositories such as this site. You get paid per click so a huge stream of traffic and mass exposure leads to income this way.
Freelancing You sell whatever skill you might have to whoever is willing to pay for it, except for the traditional options there are some more niched options, fiverr for example, where the price can be nothing other than $5 for a service. There's also sites where the line between donations/begging and freelance is blurred such as kickstarter or indiegogo where people donate if you have a project they find interesting and would like to see completed, in return people get some benefits depending on how much they donate.
Page flipping is when you sell a web site, or buy one. A site with huge amounts of traffic(with some decent monthly adsense income) will obviously be of interest to some.
Product creation You create something, digital, real, a service or anything else you can think of that people would pay for, and you sell it. This can be small ebook guides, large specialist programs, paintings, wood carvings, hardware, bottled air or whatever you think is sellable. I would also include products which generate income trough royalty to this, this can be music, articles or photographs, there are sites dedicated to this. With publish on demand services such as provided by createspace you could even have real books made. Product creation is often combined with the practice of List Building, where you simply gather the email adresses of potential customers to be able to remind them when you release a new product or updated product or have some special offer.
These few points are of course by no means a full list, but they are common methods which are cheap to get started with, there are of course no guarantee you'll earn money from any of these, but for some dedicated hard working people they provide a living.