Hey there,
The people that own these website make them rank high in Google (somewhere in the first page ideally) and they do that through SEO (Search Engine Optimization) usually they find low competition keywords that are getting a decent amount of searches a month and they rank their website high by getting other sites to link back to theirs also while putting in those keyword phrases and using them into their post.
This makes Google read this website as it being valuable because other high authority websites are linking back to it and makes it relevant because the words the end user is looking up on Google is the same words that are in some of their articles.
So if you do this many times and have this website up for a long while Google will most likely rank you first page if theirs not much competition.
Then when people lookup those phrases on Google they get shown this persons website which they monetize using Google AdSense which places relevant ads on the side bar and every time someone clicks on the ad depending on how valuable the keyword is when the person that has the ad will pay and the guy with the website will make a small bit of money, but Google takes out some fees, but if it gets enough traffic and enough people click on the ads then this can really add up!
It just takes a while and can be quite stressful in the beginning writing all the content and stuff, but once it's up and ranking first page of Google without much competition it really is all hands-off and just consistently makes money as long as no one takes your spot on Google and people keep on searching those keywords that your rank for
Hope this helped
Adam