Calories measure the amount of energy provided by food. Your body uses this energy to perform essential functions, support daily activities, and keep you alive. Weight gain occurs when you consume more calories than your body burns, while weight loss happens when you burn more calories than you consume. The number of calories your body needs each day varies based on factors such as your age, sex, weight, and physical activity level.