A calorie is simply a unit of measurement used to determine how much energy is in a given food. (Just a note: the term “calorie" is often used interchangeably with the term “kilocalorie,” which is why you sometimes may see calories referred to as a “kcal,” which is short for kilocalorie.)
Like any well-oiled machine, your body needs energy in order to carry out all the many tasks that it does on a daily basis, from exercising to using your brain, which is why you need a certain amount of energy from your food on a daily basis.