Snakes, like all reptiles, are cold-blooded, which means they are ectothermic. This means that their internal body temperature is regulated by the temperature of their environment, rather than by an internal physiological mechanism like warm-blooded animals. Snakes are able to control their body temperature to some extent by moving to warmer or cooler areas within their environment, such as basking in the sun or seeking shade. This is why you may see snakes sunning themselves on rocks or logs during the day to warm up, and then retreating to cooler areas when they need to cool down.