There was in the days of Herod, the king of Judea, a priest named Zechariah, of the division of Abijah; and his wife was of the daughters of Aaron, and her name was Elizabeth…. Once when he [Zechariah] was serving before God while his division was on duty… (Luke 1:5, 8)
During the Second Temple period, the twenty-four priestly divisions served in the temple at Jerusalem in a rotation system. A list of priestly divisions can be found in 1 Chronicles 24:7-18, which is usually dated by scholars to the fifth century B.C.E. There is no mention there, however, of any fixed order of service. Only in post-biblical traditions is it mentioned that the priestly divisions served according to a weekly rotation system.
The priests themselves lived not only in Jerusalem but also in other settlements in the land of Israel. When it was “time for the division to go up [to Jerusalem]” (Mishnah, Ta’anit 4:2), the priests left their homes, went up to Jerusalem for a week, and afterwards returned to their homes in Judea or Galilee.