One of the first things that you should consider if your snake stops eating is the circumstances around it. If this is a new snake that you have many times it takes a few days for them to acclimate before they're interested in eating. Those first few days they're getting used to things. Is it close to a shed? Did they just recently shed? Are they ready to lay? Are there physiological reasons? Are there things going on like that, because many times, they won't eat for a while.
Is it a change in season? Snakes will do something called brumate. It's kind of a fancy hibernation. With hibernation mammals will live off of the fat, but they don't do that. Their metabolism literally slows down to a crawl, to where they just don't expend calories and they won't eat during that period. So has the temperature changed in the environment? Is it fall and winter?
Because sometimes if they brumate, which means they'll start to slow down they won't eat from anywhere from one to three months. Brumation is a very important thing to understand and do properly, otherwise you can get a very sick snake, because remember they're not sleeping. They're just slowing down, so the humidity has to be right, the environment has to be right and there's actually a proper way to put them into their hibernation or brumation.
Is your snake healthy? Is it bright, alert and happy? Round and vivacious, like this little king snake that we have here? If it is then sometimes, it's just not hungry. They normally will eat, go to the bathroom and then their appetite can increase, so sometimes has that occurred? If you notice that they're breathing with difficulty, there's odor in the mouth, there's bubbling in the mouth, a lump or an abnormality along the snake, then those are reasons to give your veterinarian a call.
If within three or four weeks and none of those other things have occurred, your snake is not eating or if it's losing weight, then you need to call your veterinarian immediately, so there's a few helpful hints if your snake stops eating.