NM is awarded by each country's national chess federation, not by FIDE, so how it compares to CM depends on each country's criteria for NM.
You get cm and then fm and im and then gm
There are FMs that went straight to GM and were never an IM ..... Kramnik is one very famous example I believe , so is the USA's Larry Christiansen .