Cyberscoop has a fantastic article on how hackers boost viewer numbers on ads.
The two main methods discussed are hiding ads on websites via “pixel stuffing, when an ad is hidden in a picture. Then there’s ad stacking, which occurs when multiple ads are hidden under a single banner or display. ”
The other common technique is using a botnet, ” The hackers who control that malware use it to call up an invisible web browser on that user’s machine without their knowledge, and visit junk websites or click on advertisements. “