Calorie is a unit of energy. Strictly speaking, a calorie is the amount of energy needed to raise the temperature of 1 litre of water by 1 degree Celsius. In nutrition, calories refer to energy consumption through eating and drinking.
Humans need calories (energy) to survive, we acquire this energy from food and drink. Furthermore, if you consume more calories than you burn, you will gain weight. On the other hand, if you burn more calories than you consume, you will lose weight. Your body is always burning some minimum amount of calories to support the function of vital organs. The more physically active you are, the more calories you are burning.
The number of calories food contain tells us how much potential energy it has. Food is made up of three main components, protein, carbohydrate (carbs) and fat. We need all three of them but in what proportion is often hotly debated. 1 gram of protein contains 4 calories, 1 gram of carbs also contains 4 calories while 1 gram of fat contains 9 calories.
Protein is used for growth and repair of the body. Muscles need protein in order to grow, which is why bodybuilders often use protein supplements. High protein diets are used as weight loss diets, it looks like protein reduces appetite. A common recommendation is that 20-35% of calories should come from protein. But there are no dangers associated with higher intakes of protein. Meat, fish, eggs and dairy products are examples of food that contains a lot of protein.
Carbs play a critical role in the proper functioning of the human body. A deficiency of carbohydrates can lead to a number of serious problems. In the western world carbs deficiency is rare, a much bigger problem is excessive consumption of carbohydrates, like sugar. If you eat more carbs than you burn, the excess will be stored as body fat. Too much sugar can also cause diabetes. The standard recommendation is that about half of your calories should come from carbs. But there are good and bad carbs, try to cut down on food and drinks containing a lot of sugar. Whole grain foods are a much healthier source of carbs.
Also fats can be divided into good fat and bad fat. Unsaturated fat, found in for example oily fish, nuts and olive oil, is good fat. Saturated fat is less healthy and should be avoided as much as possible. As a rule of thumb, saturated fat is generally solid at room temperature while unsaturated fat is liquid. Trans fat is a modified sort of saturated fat and should be avoided. Typically, 20-35% of calories should come from fat.
Needless to say, there is almost as many diet experts and gurus as there are opinions about good and bad diets. The Paleo diet does not count calories but it is high in protein, often low in carbs and high in fat.