Welcome to Maseches Chagigah, chapter 1, mishnah 1. This tractate deals primarily with the mitzvah of re'iyah - the obligation to appear in the Beis Hamikdash on the three festivals, Pesach, Shavuos and Sukkos - and with the offerings a person is obligated to bring during those festivals.
The words of the mishnah: "Hakol chayavin bere'iyah" - everyone is obligated in re'iyah. The mitzvah of re'iyah is the obligation to appear in the Beis Hamikdash on the three festivals, to come and bring the olas re'iyah, an olah offering that is entirely burned, brought when a person appears in the Beis Hamikdash.
Those exempt from re'iyah:
A cheresh (deaf person) - the Gemara clarifies that the exemption applies even to a deaf person who can speak, and it is not because he is not obligated in mitzvos, since a deaf person who can speak is obligated in mitzvos. The reason is that the mitzvah of re'iyah derives its laws from the mitzvah of hakhel, the gathering held once in every shemittah cycle, in which the entire nation assembled in the Beis Hamikdash to hear the reading of the Torah. There the Torah says "lema'an yishme'u" - so that they will hear - and from here we learn that one who cannot hear is not obligated, even if he is able to speak.
A shoteh (mentally incapacitated person) and a minor - because they are not obligated in mitzvos.
A tumtum - one whose reproductive organs are covered over, so it is not clear whether he is male or female. Since he may be female, and women are not obligated in the mitzvah of re'iyah, he too is exempt, for we learn that the one obligated must be definitely male.
An androginus - one who has both female and male reproductive organs.
Women - they are not obligated.
Canaanite slaves - a Canaanite slave who has not yet been freed, since he is obligated only in those mitzvos in which a woman is obligated, and since a woman is exempt, he too is exempt.
A lame person - one who cannot walk.
A blind person - and the Gemara says that this includes even someone who is blind in only one eye.
A sick person and an elderly person.
One who cannot go up on foot - the Gemara explains that this refers to someone who is extremely delicate and pampered, and for that reason he is unable to go up from Yerushalayim to the Beis Hamikdash.
Defining the minor:
The Gemara seeks to arrive at a precise definition: which minor is the one exempt from the obligation? By way of introduction, although a minor is not obligated in mitzvos in his own right, since he is below the age of bar mitzvah, nevertheless with regard to the mitzvah of re'iyah there is an obligation upon the father to train him. The question, then, is at what stage the obligation of chinuch begins.
Beis Shammai: "Kol she'eino yachol lirkov al kesefav shel aviv vela'alos miYerushalayim leHar HaBayis" - any child who is unable to ride on his father's shoulders and go up from Yerushalayim to the Temple Mount. As long as the father can carry him on his shoulders, that is enough to obligate him in chinuch.
Beis Hillel: "Kol she'eino yachol le'echoz beyado shel aviv vela'alos miYerushalayim leHar HaBayis" - any child who is unable to hold his father's hand and go up from Yerushalayim to the Temple Mount. This refers to a slightly older age, at which the child is able to hold his father's hand and go up on his own feet.
The source of the law is in the wording of the verse: "shalosh regalim" - three festivals, literally three foot-times. The Torah could have said "three times," and chose to say "three regalim" to hint that the ability to go up on foot is required. For this reason a lame person and one who cannot go up on foot are exempt. And just as an adult is not obligated when he is unable to go up, so too with a minor: if the child is not able to walk on his own feet, his father is not obligated to train him, according to Beis Hillel.
In summary: in this mishnah we learned that everyone is obligated in re'iyah, and we went through the list of those who are exempt - a deaf person (even one who can speak, from the derivation of the verse "lema'an yishme'u" stated regarding hakhel), a shoteh, a minor, a tumtum, an androginus, women, Canaanite slaves, a lame person, a blind person, a sick person, an elderly person, and one who cannot go up on foot. We also studied the dispute between Beis Shammai and Beis Hillel in defining the minor with regard to the obligation of chinuch, and the derivation from the phrase "shalosh regalim," which makes the obligation dependent on the ability to go up on foot.