Three times a year, all males must appear before God in the place that He will designate… (Deuteronomy 16:16)
Every male was to show his face in the Temple three times a year, on each of the three Festivals. A man was to bring every son who was old enough to walk on his own. When they got to the Temple, they were to offer a korban olah (burnt offering) called the olas r’iyah, meaning “the olah of appearing (at the Temple).”
Every morning in the preliminary prayer service, we recite a mishna enumerating certain things that have no prescribed limit. One of these is the thrice-annual visit to the Temple. The visit itself has no prescribed time one must stay in order to fulfill his obligation, plus the sacrifice has no set limit. One could bring whatever he likes, even a single pigeon or dove.
The underlying rationale for this mitzvah is to stir the hearts of the people by keeping them involved in Temple life. It’s not some foreign, esoteric process that occurs far away, only for the benefit of the kohanim. It’s a living, breathing part of Jewish life in which every family takes an active role.
This mitzvah only applies to men and only in Temple times. In the Talmud, it is the subject of the first chapter in tractate Chagigah. It is codified in the Mishneh Torah in the first chapter of Hilchos Chagigah and is #53 of the 248 positive mitzvos in the Rambam’s Sefer HaMitzvos.