The thermic effect of food is defined as the rise in metabolic rate after a meal. Whenever we eat food, the next six hours see an increase in metabolic rate, which then slowly declines toward the resting rate. The shape and magnitude of the curve are influenced by such factors as our body composition, the frequency of our meals, the composition and size of our meals, and so forth, but there is no apparent long-term effect of any eating pattern; i.e., the curve changes to match the new parameters as they change.
The thermic effect of food is different from the energy cost of metabolism. The latter is determined by the amount of energy required to turn a given amount of nutrient into ATP. Fatty acids, for example, yield the most ATP per gram, and the energy cost per molecule produced is low. Glucose yields a slightly lesser amount of ATP at a comparable energy cost. A gram of amino acid requires far more energy to produce its yield of ATP, because each molecule needs to be deaminated first (i.e., the nitrogen is removed in the form of ammonia). Protein is also at a disadvantage, if I have my facts straight, because a gram of amino acid yields less ATP.
On the whole, this arrangement suits the body well. Protein (i.e., amino acids), being needed for structural purposes, is not usually metabolised, though it is available at need. But the higher energy threshold of the reactions involved prevents it from being used unless badly needed. The reactions that break glucose/fatty acid + O2 into H2O + CO2 have a much lower energy threshold, so they are the pathways more frequently followed.
My understanding is that the energy cost of the enzymatic reactions that cleave dietary protein into amino acids, dietary carbohydrate into glucose, and triglycerides into fatty acids + glycerol is not figured into the metabolic-cost calculations. I suspect that these reactions do play a modest role, however, in the thermic effect of food.
ETA: I am working mostly from memory here, having lost most of my links. Corrections to the above will be gratefully accepted.