Right. As an author of a web site, Googles massive computers scans your content of what you are talking about and then fills in corresponding ads to fit the content. The author gets paid every time someone clicks on an ad.
In 2007 I started my web site with google AdSence and my content was going to be hunting, fishing and sausage making, which was at the same time two guys decided that, using the same program, their content would be other people's content and videos. The Google monthly checks too those guys were so big, Google decided it was cheaper to just buy them out. Yes, that would be YouTube. In my mind at the time, I think I was close, but yet missed out big.