Most snakes live on the ground, and in the trees. Others live in the water, and a few live under the soil. Like other reptiles, snakes are ectotherms. They control their body temperature by moving in and out of the direct sunshine. That is why they are rare in cold places.