Kilojoules (calories in the old British system of measurement) are a measure of energy, and can be applied to the energy content of foods. One calorie equals 4.2 kilojoules (kJ).
Different foods provide different amounts of energy and so have different kJ values. Fat generally supplies more than twice the number of kJ per gram that is provided by carbohydrates and proteins, while water and fibre have no kilojoules at all. Every kilogram your body weighs equals 35,000 kJs. If you eat 2500 kJ less than you expend every day for a week, you will lose about 500g.