The main differences are likely to be in their education (there are also probably differences in the regulations they have to follow, other than state guidelines, because they're certified by different certification bodies).
A CPM is a certified professional midwife, certified by NARM (the North American Registry of Midwives) which is an offshoot of MANA (Midwives Alliance of North America). Any midwife can become a CPM, including some CNMs have done. It is the only certification in the US that requires competency and experience with out-of-hospital birth. The paths to becoming a CPM (the education, etc) are numerous - from Ina May "I started catching babies 30 years ago, and after a few picked up an OB textbook" to attending a midwifery college and receiving a bachelor's degree. To find out the requirements for the CPM, check out the NARM website (google it).
A CNM is a certified nurse-midwife, who is required to be a nurse first (though there are combination programs, where one goes straight into a midwifery specialty), and has all the education and background of a professional level nurse. CNMs are certified by the ACNM (American College of Nurse-Midwives). They are required to be competent in and have experience with hospital birth and all the accoutrements and medicines used therein. There is no requirement in the certification for experience with out of hospital or natural birth, though there are CNM education programs that have that focus, and there have been many CNMs who went on to be homebirth midwives (and vice versa, actually). The paths to CNM are much more well defined, and all require a bachelor's degree and then further education, equivalent to a master's. To find out the exact requirements for becoming a CNM, check out ACNM.
Does that help any?