Yoma, Chapter Eight, Mishnah Four
This mishnah teaches the rules regarding children fasting on Yom Kippur.
1) [With regard to] children: they do not afflict them at all on Yom HaKippurim.
2) But they train them a year or two before in order that they become accustomed to the commandments.
Section one: Children are not to fast on Yom Kippur. Note that the mishnah does not say that they are not obligated, but uses stronger language, saying that it is prohibited to make them fast. In the Tosefta we see that Shammai (the eponymous founder of Bet Shammai) actually wanted his son to fast and the other sages forced him to feed his son. I do not think that Shammai was crueler than the other sages, nor was he endangering his young sons life. One day without food will be discomforting but is unlikely to cause any physical damage. Rather I think that Shammai had a different concept of the observance of the commandments. For Shammai the Torah commands us to afflict ourselves on Yom Kippur and the goal is therefore physical affliction. Such an affliction can be achieved on a small child, even an infant. In contrast, the sages understood the affliction as being more inwardly oriented, and hence applicable only to those who know what is going on. A child can feel hunger, they all do, but a small child wont know that his hunger is a form of religious observance. Hell just scream or if hes a little older, perhaps whine. In order to demonstrate that the point of the day is to affect our inner lives and not our physical hunger, the other sages forced Shammai to feed his son.
Section two: One or two years before a child becomes mature (today we consider this to be at the age of Bar/Bat Mitzvah) the child starts to fast, at least for a part of the day. At this point the child is beginning to understand the meaning of the day and therefore it is applicable for him to fast.