The kohanim were split into 24 groups called mishmarot (watches), each of which worked one-week shifts in the Temple twice during the year (on the holidays of Pesah, Shavu’ot and Sukkot, all of the kohanim would come to the mikdash to work). Each mishmar was broken into batei av (patrilineal families), which were made up of families who were more closely related to one another than they were to the rest of the mishmar.
According to Rashi, each mishmar was broken into six batei av, and each group was responsible for the Temple service on one of the days that they worked in the mikdash. On Shabbat, the entire mishmar performed the service. According to others (Rabbeinu Ḥananel and the Meiri, for example), every mishmar was broken into seven batei av, each of whom was responsible for one day of the week. From the Tosefta it appears that there was no standard number of batei av; some mishmarot had just four batei av, while others had as many as nine separate groups. Furthermore, it seems likely that some priestly families – perhaps those that did not come with the first waves of returnees at the beginning of the Second Temple period with Ezra and Nehemiah – did not belong to any of the mishmarot.
Every bet av had a leader, the rosh bet av, who was responsible for distributing the various responsibilities among the members of his group. He also had a measure of privilege in the mishmarot, where he received honors like standing next to the kohen gadol during certain Temple ceremonies.
The Mishna (15a) teaches that, even on fast days that are established due to drought, the bet av that is actually involved in the Temple service on a given day may not participate in the fast – depending on its severity – due to their focus on the Temple service. The entire mishmar would limit their fast in case they needed to assist the bet av that was working. Similarly, even on days when a fast had not been declared, limitations were established on the bet av and mishmar drinking wine, since someone who had drunk wine could not participate in the Temple service.
Our Gemara closes with Abaye’s comment that, since we do not know which mishmar and bet av kohanim belong to today, kohanim should never be permitted to drink wine, since the Temple may be built miraculously and they will be called to participate in the service. Nevertheless we do not restrict kohanim in this way because of the teaching of Rabbi, who said that the years of destruction do not allow us to legislate such a restriction.