'a circling or going around'; plural hakafot הקפות) is a Jewish minhag (tradition) in which people walk or dance around a specific object, generally in a religious setting.
On the seventh day, the people blew shofar (ram's horn) and shouted, causing the walls to fall and allowing them to enter the city.
The Maharil (Yaakov ben Moshe Levi Moelin), "the father of Ashkenazic custom", writes: "Before taking out the Torah scroll, the reader says the line 'You showed' (אתה הראת) and the congregation answers with each verse.
The Rema (Moses Isserles), in the 16th century, records the custom of Hakafot and the joy that accompanies the removal of the Torah scrolls from the Ark.
In some communities and the Hasidic world there is a custom to observe "The Sixth Hakafa" in remembrance of the six million Jews who perished in the Holocaust.
During this Hakafa, all the Torah scrolls are placed on the Bima and covered with a Talit (during "Second Hakafot" after the holiday they also dim the lights of the synagogue) and the congregation sings a sad nigun.
Vital explains Luria had the custom to visit a number of synagogues after Simchat Torah, which delayed the end of the prayer services and did Hakafot.
Aside from Luria, additional reasons are recorded: In some Ashkenazic communities from Western Europe there is a custom that when a bride comes to the Chuppah, she circles the groom three or seven times, and afterward stands by his side.
An additional reason given is that Hakafot are a commemoration of the seven conditions of betrothal in the Book of Hosea symbolic of the engagement between God and Israel.
Alternately, the custom remembers the three ways in Jewish law a marriage becomes binding: money, contract, and sexual intercourse.