CFC is a seperate file. And you can save a cfc file with an extension of (.cfc). In cfc files you can create several methods (have restriction to number of methods in a cfc, which is according to JVM). And we can create an object for the cfc (ie a component file) and with this object by calling any methods in that particular cfc you can perform any manipulation on those methods. And you can change your presentation part using the buisiness logics used inside the cfc.
I have written an example to understand the working of cfc, Please see it below
<cfcomponent name="XMLOperation" output="false">
<cffunction name="ReadXML" access="public" returntype="Array" hint="To validate an XML">
<cfargument name="InputXML" required="true" type="string" hint="XML to be read">
var XMLString = "";
var ActorsName = ArrayNew(1);
<cfloop index="NodeIndex" from="1" to="#ArrayLen(ARGUMENTS.InputXML.actors.actor)#">
XMLActors = ARGUMENTS.InputXML.actors.actor[NodeIndex];
ActorsName[NodeIndex] = XMLActors.XMLAttributes.name;
In displayactors.cfm I am creating an instance for the component xmloperation.cfc.With this object I am calling the method ReadXML, which reads the xml and find the name attribute corresponding to each actor node and return the names as an array (You can view this by dumping the variable ActorsNames). In cfm file you can use this array for any purpose according to your need , say displaying actors name in a form.
I also use .cfc file...in particular application.cfc to define my application variables such as my site wide datasource.
<!--- Name the application. --->
<!--- Turn on session management. --->
<cffunction name="onApplicationStart" output="false" returnType="void">
<!--- Any variables set here can be used by all our pages --->
<cfset APPLICATION.dataSource = "ows">
<cfset APPLICATION.companyName = "Orange Whip Studios">