The practice of fasting permeates the Scriptures, but is something that is rather counter to our American culture of "dreaming thin and living fat". There are no direct instructions given in the New Testament on how to fast, but we see that the practice was consistent amongst people in both Testaments (c.f. Ex 34:28; 2 Sam 12:15-22; 2 Chrn 20; Est 4; Daniel 9; Neh 1; Matt 4:2; Acts 13:1-3; Acts 14:13-24).
What is fasting? Fasting is primarily associated with voluntary abstinence from food (not some crash diet to lose weight) in order to draw near to God and spiritual purposes. And while you can fast from other things than food for the same purpose (movies, television, cell phones, Internet, some specific foods, sports, hobbies, etc.) this is what is most common in the Scriptures. Fasts in the scriptures usually abstained from food anywhere from 1-40 days, and occasionally refrained from all liquids as well (c.f. Ez 10:6; Est 4:16; Act 9:9) and could be done privately (Mat 6:16-18) or corporately (Joel 2:15-16; Acts 13:2). The most common fasts amongst Christians today is probably abstaining from food but drinking water privately, and occasional fasts (when a special need arises - c.f. Mat 9:15)
Why do we fast? Fasting is a spiritual discipline in which one undergoes self-discipline (through the power of the Holy Spirit, not one's own will power however - c.f. Luke 4:1-14) for the purposes of seeking God, for God's own sake, not for what you want God to do for you. Fasting is not some spiritual rubbing of the genie's bottle in which we bargain with God for something; I will give up x, if you give me y (unless "y" is to become more like Jesus). This is never the purpose of fasting in the Scriptures, and such an understanding of the God of the bible is incorrect and even blasphemous (c.f. Isa 42:8; 48:11). Fasting is to draw near to God, and to ultimately become more like His Son Jesus, which in and of itself will bring much to us; surrender, peace, insight, wisdom, repentance, love, compassion, etc.
Here are some possible reasons we fast:
To humble ourselves before God and to show our dependence on him
To devote more time and focus to our spiritual lives. The time we would've spent eating or preparing food can be used in prayer and Bible study
To ask for God's guidance as we face important decisions
Task for God's help in a crisis
To ask for God's help in overcoming spiritual dullness, lukewarmness, and numbness
To help us rebuild our relationship with God if we have wandered away or have sinned grievously
To have a special focus time of prayer weekly or monthly
To pray about some particular need in the church or as a means of group repentance
To express gratitude in Thanksgiving for a remarkable blessing, answered prayer, or spiritual victory
To ask God for breakthrough or for the change of heart
Why don't we fast? Fasting is a very difficult thing emotionally, physically, and spiritually. It places our most utter dependence upon God, and brings our frailty and weakness front and center. And we don't like being weak. I don't know about you, but fasting for me is quite difficult and I can find many excuses to not discipline myself to eat no food for the purposes of seeking God. The act of fasting is humbling, but who likes to be humble? Yet if we humble ourselves, God will lift us up (1 Pet 5:6).