Mammals (including humans) normally regulate their body temperature in a stable range (in humans ~37C). However, some mammals can save energy for certain periods of time by entering hibernation and allowing their body temperature to vary with the environmental temperature (see figure below).
Hibernation is often (but not only) found in animals during winter, when it is cold and not much food is available. During hibernation, body temperature is reduced to more or less the temperature of the environment and heart rate is slowed down in a process called torpor. Torpor bouts can last a few days or weeks and torpor bouts are usually interrupted by regular arousals during which the body temperature returns to normal and the animal may be active for a few hours.
Some animals can also use something called daily torpor for only a few hours of the day, which allows them to save energy while they still continue to be out and about during their active period (which is often at night).