Fasting is an obligation on every adult, sane, settled [i.e., not travelling] Muslim who is able to fast and has nothing such as hayd [menstruation] or nifaas [post-natal bleeding] to prevent him or her from doing so.
A person is deemed to have reached adulthood when any one of the following three things occur: emission of semen, whether in a wet dream or otherwise; growth of coarse pubic hair around the private parts; attainment of fifteen years of age. In the case of females, there is a fourth, namely menstruation; when a girl reaches menarche (starts her periods), she is obliged to fast even if she has not yet reached the age of ten.
Children should be instructed to fast at the age of seven, if they are able to, and some scholars said that a child may be smacked at the age of ten if he does not fast, just as in the case of salaah. (See al-Mughni, 3/90). The child will be rewarded for fasting, and the parents will be rewarded for bringing him up properly and guiding him to do good. Al-Rubay’ bint Mu’awwidh (may Allaah be pleased with her) said, speaking about Ramadaan when it was made obligatory:
"We used to make our children fast, and we would make them a toy made out of wool. If any one of them started to cry for food, we would give them that toy to play with until it was time to break the fast." (al-Bukhaari, Fath, no. 1960).
Some people do not think it is important to tell their children to fast; indeed, a child may be enthusiastic about fasting and may be capable of doing it, but his father or mother may tell him not to fast, out of so-called "pity" for him. They do not realize that true pity and compassion consist of making him get used to fasting. Allaah says (interpretation of the meaning):
"O you who believe! Ward off from yourselves and your families a Fire (hell) whose fuel is men and stones, over which are (appointed) angels stern (and) severe, who disobey not, (from executing) the Commands they receive from Allaah, but do that which they are commanded." [al-Tahreem 66:6].
Extra attention must be paid to the matter of a girl’s fasting when she has just reached maturity, because she may fast when she has her period, out of shyness, and then not make up the fast later.
If a kaafir becomes Muslim, or a child reaches puberty, or an insane person comes to his senses during the day, they should refrain from eating for the rest of the day, because they are now among those who are obliged to fast, but they do not have to make up for the days of Ramadaan that they have missed, because at that time they were not among those who are obliged to fast.
The insane are not responsible for their deeds (their deeds are not being recorded), but if a person is insane at times and sane at other times, he must fast during his periods of sanity, and is excused during his periods of insanity. If he becomes insane during the day, this does not invalidate his fast, just as is the case if someone becomes unconscious because of illness or some other reason, because he had the intention of fasting when he was sane. (Majaalis Shahr Ramadaan by Ibn ‘Uthaymeen, p.28). A similar case is the ruling governing epileptics.
If someone dies during Ramadaan, there is no "debt" on him or his heirs with regard to the remaining days of the month.
If someone does not know that it is fard (obligatory) to fast Ramadaan, or that it is haraam to eat or have sexual intercourse during the day in this month, then according to the majority of scholars, this excuse is acceptable, as is also the case for a new convert to Islam, a Muslim living in Daar al-Harb (non-Muslim lands) and a Muslim who grew up among the kuffaar. But a person who grew up among the Muslims and was able to ask questions and find out, has no excuse.