From what I understand, the CM theme engine is actually the theme engine from the "sense" based roms from T-Mobile. This code was taken in by the community and raised as their own. The way the theme engine works is by backing up the stock theme in the phones storage. It the uses different png, ico, and xml files to replace the stock theme files (stock png, ico and xml) in the root dir (various files such as the system framework).
For example, a theme that only changes the backdrop in the notification shade would replace a png file found in system framework, as well as modify an xml file for the alpha channel (for ics and later). I really don't do too much with theming, but check out the XDA-DEVELOPERS forums for more info. They have anything android related you would ever need.