CPM
can be purchased on the basis of what it costs to show the ad to one thousand viewers (CPM). It is used in marketing as a benchmark to calculate the relative cost of an advertising campaign or an ad message in a given medium. Rather than an absolute cost, CPM estimates the cost per 1000 views of the ad.
CPA
CPA (or cost per action) is considered the optimal form of buying online advertising from a direct response advertiser's point of view. An advertiser only pays for the ad when an action has occurred.