Fasting usually refers to not eating. Sometimes a fast would involve not eating or drinking for a period of time (Exodus 34:28; Luke 4:2). Some fasts were only during day light hours (2 Samuel 3:35).
Jewish and Christian practice
God only required the Jews to fast on the Day of Atonement (Leviticus 23:26-32; Acts 27:9) During their captivity, the Jews added several annual fasts to remember certain sad days in their history.
There are many examples of private fasting (2 Samuel 3:35; 12:16; 1 Kings 21:27; Ezra 10:6; Nehemiah 1:4; Daniel 10:2,3). Moses fasted forty days (Exodus 24:18; 34:28). Elijah did too (1 Kings 19:8). The Lord Jesus fasted forty days in the wilderness (Matthew 4:2).
Jews who were early followers of Jesus continued to participate in some of the Jewish fasts (Acts 13:3; 14:23; 2 Corinthians 6:5). However, Jesus did not command His followers to fast.
Purpose of fasting
Fasting is a way of showing repentance of sin or seeking favor from God (1 Samuel 7:6; 2 Chronicles. 20:3; Jeremiah 36:6-10; Nehemiah 9:1). People also fast to seek favor from God (2 Samuel 12:16–23).
Fasting which is not accepted.
Fasting without having a repentant heart does not please God (Isaiah 58:4; Jer. 14:10–12). Jesus taught that fasting to show others our righteousness will not receive a reward from God (Matthew 6:16).
(Adapted or copied from the public domain Easton’s Bible Dictionary.)