Thermogenesis is a process in which the body generates heat. Warm-blooded animals all engage in thermogenesis, and some plants are capable of generating heat as well. The goal of thermogenesis is for the body to keep its temperature stable so that it can function as efficiently as possible, and for the body to be able to access certain type of energy. Thermogenesis actually requires a great deal of energy, which is why cold blooded animals require far less energy to live.
To keep temperatures stable, the body can generate heat in two ways. The first method is shivering, in which the body creates friction which generates warmth. The second method involves chemical reactions in the fat cells which generate heat to keep the body warm. Historically, people in colder climates have tended to accrue fat for this reason, so that their bodies are supplied with the fat they need for thermogenesis. This type of thermogenesis occurs whenever the body senses that external temperatures are low, and that therefore the body needs to make heat to keep the internal temperature at the optimal level.
In exercise-induced thermogenesis, the body creates heat to warm up the muscles because warm muscles work better and more efficiently. This is why people start to warm up and sweat as they exercise, because the body is firing off chemical reactions to warm up the muscles and keep them warm. This is also why it is important to stretch and cool down slowly after exercise, so that the muscles are not brought abruptly from a working hot state to a resting cold state.
Regular hard exercise tends to trim fat from the body, because the body starts to burn lots of fat cells to warm up the muscles for exercise. Athletes require a larger caloric intake for this reason, to prevent their bodies from burning up muscle cells for energy. Nutrition is especially important during training, as an athlete needs to support his or her body while pushing it to perform at its peak, and nutritional deficits in training can cause long-term problems.
The body can also generate heat in response to dietary triggers. Energy is required to digest food, and thermogenesis can be used to create that energy. When people eat a big meal and start sweating, it indicates that their bodies are gearing up for digestion. People sometimes use diet-induced thermogenesis as a weight loss technique, by eating foods which trigger thermogenesis so that their bodies will burn fat; a number of companies sell supplements for this purpose.