Google AdSense is a program by Google that offers contextual advertising in the form of text, video, image or rich media ads. Before any ads can be served to your site you will have to apply for the Google Adsense program which is absolutely free to apply for. You will get a little piece of code that you will have to insert into your site.
Say, you have created a hub on how to remove a virus from your computer, what Google bot does is it scans your hub for various keywords which Google recognizes as topics or themes on the basis of which it can serve adds. So in this case Google will likely serve adds that are related to computers, computer viruses, antivirus programs etc. Once a visitor to your hub clicks on one of these ads you will earn a revenue. Bear in mind that the amount you earn depends on the niche you're in and the choice of keywords you have chosen. Some topics are just more expensive for the Google Network publishers to advertise for and so your revenue is also higher.
Google allows for up to three Adsense units to be installed on any single page. If you use HubPages you don't have to worry since HubPages installs those units for you automatically. If you use a WordPress type of site, depending on the WP theme you use you will have various options how to do it. Generally, it's not hard to install Adsense code and there are great tutorials offered on YouTube.