Regarding The Prophet's (Sallallahu ‘Alayhi wa Sallam) Guidance in Fasting
Excerpt from the Book: Provisions for the Hereafter
by Ibn Qayyim
Since the intention behind fasting is to restrain oneself from desires in order to prepare oneself for seeking that wherein lies the utmost happiness and the acceptance of that which purifies the heart and reduces the sharpness of hunger and thirst and reminds one of the hunger felt by the needy and narrows the courses of Satan by narrowing the courses of food and drink. It is the bridle of AlMuttaqun  the shield of the warriors and the (spiritual) exercise of the righteous, who are near to Allah. And out of all acts, it is for the Lord of the worlds, for the fasting person does not do anything; he only refrains from following his desire - and that is abandoning the things which he loves for love of Allah and it is a secret between the slave and his Lord, for the slaves might observe one abstaining from the things which clearly break the fast, but as for him abstaining from them for the sake of the One Whom he worships, that is something that mankind cannot see and that is the reality of fasting.
Fasting has an amazing effect on protecting the limbs (from sin) and the internal urges from attraction to corrupting elements and in removing the harmful substances from the body which prevent it from attaining good health. It is one of the greatest forces in helping one to achieve Taqwa, , as Allah, Most High says: يَا أَيُّهَا الَّذِينَ آمَنُوا كُتِبَ عَلَيْكُمُ الصِّيَامُ كَمَا كُتِبَ عَلَى الَّذِينَ مِن قَبْلِكُمْ لَعَلَّكُمْ تَتَّقُونَ
"0 you who believe! Observing As-Saum (the fasting) is prescribed for you as it was prescribed for those before you, that you may become Al-Muttaqun (the pious)." (Surah Al-Baqarah 2:183)
And the Prophet
ordered those whose desire for marriage is intense, but who are unable to do so, to fast and he declared it to be a means of controlling these desires. 
The guidance of the Prophet
was the most perfect of guidance and the greatest in achieving the goal of fasting and the easiest for human beings to follow. And since weaning people away from their desires and the things to which they are accustomed is one of the most difficult things, the injunction to fast was delayed until after the Hijrah;  and at first its obligation was in the form of a choice between fasting and feeding a needy person for each day, then fasting was made compulsory and feeding a needy person was granted for the old man and the woman, if they are unable to bear fasting. And it was permitted for the sick person and the traveller to break their fast and to make up for it; likewise, it was permitted for the pregnant woman and the breast-feeding woman, if they fear for their health. And if they fear for the safety of their children, then in addition to making up for the fast, they must feed a needy person for each day.  This is because their breaking the fast is not due to fear of illness, but it is done in spite of the woman being in good health and so she must feed a needy person, as was the case with a person who broke his fast in the early days of Islam.
It was a part of his
guidance in the month of Ramadan to perform many acts of worship of various types, and Gabriel (peace be upon him) used to go over the Qur' an with him in the month of Ramadan. He also used to perform many acts of charity and benevolence, recite the Qur'an and pray, mention Allah's Name (Dhikr) and perform
I'tikaf  He used to favor Ramadan with more acts of worship than other times. So that he would sometimes fast continuously for two days or more without breaking the fast (Al-Wisal), in order to devote the hours of the day and night to worship. But he forbade his Companions from practising Al-Wisal. They said to him: "But you practise Al-Wisal." He said: "I am not as you." I stay with my Lord and he sustains me."  He prohibited it out of compassion for his people and he permitted it up to the predawn.
 Al-Muttaqun: The pious and righteous, who fear Allah much.
 Taqwa: Fear of Allah, piety, righteousness.
 Narrated by Al-Bukhari, Muslim, At-Tirmidhi, Abu Dawud and An-Nasa'i.
 Hijrah: The migration of the Prophet
and his Companions from the persecution of Makkah to the freedom and security of Al-Madinah.
 Narrated by the compilers of the 'Sunan' and Ahmad, At·Tahawi and At-Tabari.
 I'tikaf Seclusion in the mosque during the last ten days of Ramadan for the purpose of devoting oneself to the worship of Allah, Most High.
 Narrated by Malik in 'Al-Muwatta".