Files ending in CFM are source code files in the ColdFusion Markup Language. ColdFusion ML is a scripting language developed by Allaire (now part of Adobe) for server-side Internet applications. Typically, CFM files are web pages with Coldfusion script code running on a Coldfusion server. The html code is added to the file by the server so that it can be displayed to the user in a web browser.
Coldfusion offers the developer a variety of functions and tags such as database queries, image manipulation and mathematical operation as well as formatting options. Coldfusion Server is few because of Adobe's proprietary license. With Railo there is also an open source server, which does not support all features and tags of Coldfusion.
CFM files are just text files that can be processed by a ColdFusion server. They can be opened and edited in any text editor, however it is recommended to use editors with developer functions such as syntax highlighting for easier work.