Some of the adverts are those displayed for a certain client and are usually paid in advance for a fixed period. Other adverts are more popular and are sponsored by Google. They come as Google Adsense. Clients pay to Google to advertise their products. Google then pays to Web Masters through Adsense. The pay is based on the number readers/web visitors that click on the adverts. The adverts are usually found on the top and the sides of the webpage.
The next time that you click on any advert will benefit a hardworking Web Master.