And when he had fasted forty days and forty nights, he was afterward an hungred.
Note 1 at Mt 4:2: Fasting is referred to seventy-eight times in Scripture. In the Old Testament, Isa 58:3-12 gives one of the clearest teachings on fasting. Jesus taught on fasting in Mt 6:16-18. Most of the Scriptures' teachings on fasting are by precept. There are at least thirty-five people in the Bible who fasted. Of these, three fasted forty days: Jesus (this verse), Elijah (1Ki 19:8), and apparently Joshua (Ex 24:13-18). Moses fasted for forty days without food or water and then immediately (De 9:9-25 with Ex 32:30) repeated the fast, bringing his total abstinence to eighty days.
Fasting accomplishes many things. One of the greatest benefits of fasting is that through denying the lust of the flesh the spirit man gains ascendancy. Fasting is a powerful weapon to be used in the battle described in Ga 5:17. In Scripture, fasting was always used as a means of seeking God to the exclusion of all else. Fasting does not cast out demons, as Mt 17:21 might suggest at first glance, but rather it casts out unbelief (see note 4 at Mt 17:21). Therefore, fasting is beneficial to every aspect of the Christian life, not only in the casting out of devils.
Without supernatural intervention, a person cannot fast without water for more than three days before the body begins to die. The average person can only live seven days without water. However, a healthy person can fast from food for forty days before starvation begins to occur. Many of the hunger pains experienced at the beginning of a fast are just from the appetite starving and will leave after a few days. When hunger returns at around forty days, starvation has begun; the fast should be broken unless it is a supernatural fast, as was the fast of Moses.
When ending a fast, one should use wisdom. Some people have died from eating "solid" food too soon. A general rule of thumb to be used for extended fasts (over ten days) is to allow an equal number of days after the fast until one is back to eating normally.
The real virtue of a fast is in humbling oneself through self-denial (Ps 35:13 and 69:10), and that can be accomplished through ways other than total abstinence. Partial fasts can be beneficial, as well as fasts of one's time or pleasures. However, because appetite for food is one of man's strongest drives, fasting from food seems to get the job done the quickest. Fasting should be a much more important part of seeking God.