Allah عَزَّوَجَلَّ the Most Exalted has enjoined fasting upon the Muslims as He had enjoined it upon previous nations. He, the Exalted, says:
The Islamic way of fasting involves abstinence from eating, drinking, sexual intercourse and all prohibited habits such as smoking etc. The fast is observed throughout the daylight hours of the lunar month of Ramaḍān (from dawn till sunset). When done in obedience to Almighty Allah’s عَزَّوَجَلَّ command, fasting teaches believers patience and self-control, as well as reminding them of their responsibility toward the millions of human beings who lack provisions or are victims of their unjust distribution. The month of fasting is accompanied by increased efforts toward good manners and righteous deeds, along with additional worship at night (20 Rak’aat of Tarāweeḥ Ṣalāh). Fasting is not a retreat from life; rather; it is a supplement to the Muslims ordinary activities.