Most people celebrate Purim on the 14th of the Hebrew month Adar. But in a city which was walled in the time of Joshua's conquest of Israel, Purim is celebrated on the 15th. Here's why:
Haman decreed that all Jews be killed on the 13th of Adar. When the day came, the Jews miraculously defended themselves. On the following day, Adar 14, the Jews celebrated.
In Shushan, the walled capital city of the Persian empire, the Jews had an extra day to fight their enemies. They didn't celebrate until the 15th.
In remembrance of these events, Mordechai and Esther instituted two separate days of Purim, Adar 14 and 15. The 14th commemorates the national victory. The 15th - Shushan Purim - commemorates the victory of the Jews who lived in the walled city of Shushan.
So if you're like most Jews, you celebrate Purim on the 14th. But, if you happen to live in Shushan, or in any ancient walled city, you celebrate Purim on Adar 15th.
The definition of an 'ancient walled city' is any city surrounded by a wall in the days of Joshua. Logically, the definition should be a city that was walled in the time of Mordechai and Esther, but the Sages didn't want to exclude Jerusalem, whose walls were in ruins at the time of the Purim episode.
Some people keep two days of Purim because they are in doubt whether their city is considered 'walled.' One example is Hebron. The Jews in Hebron keep two days of Purim because it's doubtful whether the entire wall around Hebron existed at the time of Joshua.
Another example is Tiberias, a walled city on the shore of Lake Kinneret. Tiberias was walled from the time of Joshua. The doubt arises because Tiberias has no wall along the shore. Is Tiberias considered an 'open' city because it is unwalled along the shore? Or is the lake considered a 'wall' since it protects the city from attack? This question is left unresolved in the Talmud.
- Shulchan Aruch Orach Chaim 688:1,3,4;
- Mishna Berurah 1,9