This happens through auctions on Ad Exchanges, where publishers offer their ad inventory and advertisers bid on them, with winners’ ads finally shown to the visiting user. Some deceitful publishers fabricate impressions to steal from advertisers. One way to combat this is by using a DSP or ad network with https://adserver.easypub.eu/pt/