Say someone eats 100 calories of chocolate vs. 100 calories of carrots. Something tells me that eating the chocolate will lead to you generating more fat. Will it? Is it harder to burn the calories that you consumed from the chocolate?
It isn't burning of the calorie you should consider as once digested different calories are stored in the same manner, it is actually the digestion itself.
Proteins are by far the most energy requiring foods to digest such that around 20% of the calories in proteins are used in extracting them. In comparison carbohydrates are much easier at around 5-10% whilst fats are even easier to digest.
But think of it in simple terms, chewing a vegetable and digesting it down and the relatively sheer quantity of mass you need to make it calorifically the same value as chocolate means that yes 100 calories isn't 100 calories.
All then in terms of real life application, our bodies respond to how much we eat. If we eat a large volume of low calorie food we will eat less calories in total. This also plays an important role.