CPM and CPC are acronyms for 2 different way of buying media.
CPC is simple enough, it stands for ‘cost per click’. If you are using a CPC buying model, publish an ad on Google, Bing or some other 3rd party platform, and a web user clicks on that ad (redirecting that user to your website); you will be charged.
Before the ad goes live you will agree the price you will pay for each click with the publisher.
CPM is a little more confusing. It stands for ‘cost per thousand’. The ‘M’ in CPM represents the Roman numeral for 1,000. If you are using a CPM buying model, you are paying for views of your ad rather than clicks. 1,000 views to be exact.
CPM is usually used when advertising via AV, or display.
NB most marketers will use the term ‘impressions’ rather than views.