When you exercise, your muscle cells need to rapidly mobilize large amounts of glucose to provide energy. Only a quarter of this energy is actually converted to motion, however; the remainder is lost as heat. Your body employs a variety of mechanisms to rid itself of this excess heat, but body temperature can still rise slightly during prolonged exercise and drop slightly thereafter.
While you exercise, blood vessels near the surface of your skin dilate and glands in your skin secrete sweat to help cool you down. Despite these measures, however, your body temperature can still rise by a couple of degrees Celsius before the rate of heat loss equals the rate of heat gain from metabolism. Occasionally, core temperature during exercise can rise to as high as 40 degrees Celsius or 104 degrees Fahrenheit, although this is more unusual.
After you stop exercising, the rate at which your body produces heat decreases, while the mechanisms you use to dissipate heat remain in operation until your core temperature returns to its normal level. Your core temperature doesn't drop below normal levels, however, unless another health condition is involved. Normal resting core temperatures can range from 97.7 to 99.5 degrees Fahrenheit. It may take a little time before elevated temperature during exercise returns to normal.
A 2008 review in the journal "Annals of the Academy of Medicine, Singapore" described an experiment that illustrates how body temperature changes during and after exercise. Ten male recruits in the Singapore Armed Forces marched seven and a half miles carrying a heavy load, pausing twice during this period to rest. The average core temperature of the recruits rose from 99.5 degrees at the start of the march to a little over 101 by the first rest period, then sank back to about 100 degrees F. When they started marching again, their average temperature rose to 102 before sinking back below 101 during the second rest period.
The rate at which temperature falls after exercise may depend on ambient air temperature and other conditions. It's much easier for your body to lose heat, for example, if you're running in midwinter in North Dakota than it is in midsummer in Texas. It's also important to make sure you get enough water. Because your body is secreting sweat as a way to cool down, you can potentially become dehydrated if you lose too much water.