Reptiles, amphibians and other ectotherms use external heat sources in their environment to regulate their body temperatures. Ectothermic (also called poikilothermic) animals are often called "cold-blooded" which is a bit of a misnomer as they often maintain quite high body temperatures (sometimes higher than mammals). In the wild, ectotherms move around within their habitat (from sunlight to shade, or from above ground to burrows, for example) to regulate their body temperature. If they get too cool, their metabolism slows (and in conditions that are too hot or too cold, enter states of inactivity or hibernation).
Maintaining the appropriate temperature is vital to bodily functions such as digestion. When keeping ectothermic animals, it is important to provide the proper temperature conditions in order for the animal to grow and thrive.
For many reptiles, it is not simply a matter of providing a constant temperature, however. They require a thermal gradient, or a range of temperatures from a high end to a low end. Thus, the animal can move to a higher temperature or lower temperature to suit its needs at any given time.