Answer
Szpilman was confined in the Warsaw Ghetto during the German invasion of Poland. The Warsaw Ghetto was a walled area in the Polish capital of Warsaw that was established by the Nazi German authorities in 1940. The ghetto was designed to segregate the Jewish population of Warsaw from the rest of the city and to make it easier for the Germans to control and oppress the Jews.