They have to keep moving from sunny to shady places to keep their temperature the same because they are cold blooded. I bet you didn't know that snakes have more enemies then you think. A snake's biggest enemy is the human bean. To protect themselves snakes will rattle, play dead, some flatten their heads, hiss, and some just stay still and are very reliable on their camouflage. Snakes use these skills to defend themselves from man, eagles, owls, hawks, foxes, opossums, and even other snakes.
Snakes use two different ways too catch their prey.
The first way is just by sitting and waiting for food to come and then strike. The second way they hunt is by looking for food which is called actively hunting. Snakes use these ways to hunt things like worms, toads, fish, mice, rats, frogs, warm blooded animals, amphibians, and even snakes. After a snake eats it won't eat again for a few days to a week. Most of the snakes are misunderstood because of the influence poisonous snakes have on people.