Say you want a new pair of headphones. You'll probably do something like this.
1. Search Google & look for forum/reddit threads talking about specific brands.
2. Look for those brands for further reviews, feedback, and price comparisons.
3. You will come across a review that has links to the "best price".
4. By clicking that link if you purchase that product then, or within 15-30 days (depends on the affiliate agreement) the affiliate will earn commission.
That's why big corps work with media companies. They make hundreds of thousands per month via affiliate commissions alone.
This induces a large amount of biases as media sites always recommend their affiliates over non-affiliates.