Cost-per-Click (CPC) is the most common and widely used accounting metric in online marketing.
In this metric the advertiser is only paying the publisher if a user clicks on his ad. So basically the advertiser is only paying for a guaranteed delivery of his ad to a potential customer.
The amount of money the advertiser has to pay for a click is usually determined by demand and supply in the Real-Time-Bidding process. The cost-per-click model is commonly used in Affiliate Marketing and Search Engine Marketing (SEM).
CPC has an advantage compared to CPM (cost-per-mille) for the advertiser since it provides information about the effectiveness of an ad as clicks are suitable to measure attention and interest. Publishers would always prefer to sell on a CPM basis since that reduces the risk of poorly performing ads not generating any clicks and there ad space going to waste.
At the same time cost-per-click is unfortunately especially vulnerable to Ad Fraud. Since ad fraud is mostly generated by click bots, it can skyrocket the ad spend of advertisers using the cost-per-click-model. Therefore it is advisable for marketers to use only ad networks that provide a robust anti-click-fraud program.
You can find a detailed overview of all pricing models available in this article.