Snakes go into a state of dormancy known as brumation that is similar to hibernation however they are not the same. When reptiles brumate their bodily functions slow down however they are not asleep as animals that hibernate are.
While brumating their metabolism slows down and they can go for months without needing to eat. However a brumating snake will rouse itself in order to drink water.
Another difference between brumating and hibernating is that mammals will generally go into hibernation from late fall through early spring. Reptiles that brumate don't follow a typical time line or pattern. It depends on their age, size, weight, health, and other factors as to how long they will be dormant.
Typically captive snakes don't brumate because a keeper is able to manipulate the environment so it never drops to a low enough temperature to cause it to happen.