How it's calculated
Calories burned ≈ MET × weight(kg) × hours. A MET is how much energy an activity uses compared to sitting still (1 MET). Running at ~9.7 km/h is about 9.8 METs, so a 70 kg person running 30 minutes burns roughly 9.8 × 70 × 0.5 ≈ 343 calories.
Use it as a guide, not gospel
Real burn varies with intensity, fitness, terrain and individual metabolism, so treat the number as a ballpark. Fitness trackers and gym machines often over-estimate by 20–40%.
The bigger picture
You can't out-exercise a poor diet — burning 300 calories takes 30 hard minutes, but eating them back takes 30 seconds. Exercise is brilliant for health, fitness and mood; for weight loss, your calorie intake does most of the work.
Limitations
MET values are population averages from research on typical adults performing an activity at a defined intensity — they don't account for your individual fitness level, technique efficiency, or terrain, all of which shift real-world burn up or down.