Wikipedia
Hakafot (הקפות plural); Hakafah (הקפה singular)—meaning "[to] circle" or "going around" in Hebrew—are a Jewish Minhag in which people walk or dance around a specific object, generally in a religious setting.
In Judaism, there is a custom on Sukkot to encircle the reader’s platform ( Bema) with the Four species on each of the seven days of the holiday. On Simchat Torah, the custom is to take the Torah scrolls out of the Ark and to encircle the reader’s platform and throughout the synagogue with great joy, singing, and dancing. In Islam, people encircle the Kaaba.
Circular Hakafot are a symbol of perfection and unity, or sometimes a symbol of communal cooperation, and are cultural practices of different peoples. In the United States, Native Americans prayed for rain or the defeat of enemies while they danced in circles around images of their gods. According to the story told in the Book of Joshua, the People of Israel ( Israelites) walked around the city of Jericho once a day for a week and seven times on the seventh day, with the priests leading the way, carrying the Ark of the Covenant each time. On the seventh day, the people blew ram’s horns’ and shouted, causing the walls to fall and allowing them to enter the city. In the Temple period, when they wanted to add area to the Temple Mount, they first encircled the desired area and only after added land to the Temple Mount.