A book is classified as being in the historical fiction genre when it tells a fictional story that takes place in a historical setting. The Boy in the Striped Pajamas is a fictional story, which takes place in another time (the early 1940s) and in a historic setting (Berlin and Auschwitz during the second World War).
The author created a fictional character, Bruno. Bruno was the son of the Nazi commander in charge of Auschwitz. Historically, there was a man in charge of Auschwitz who lived on the premises with his family. The fictional characters of Bruno and his family were based on this real-life family, but were largely creations of John Boyne, the author.
Bruno's experiences in "Out-With" (what he calls Auschwitz) were based on historical fact. Boyne described what Auschwitz was like during World War II. He described the conditions of the prisoners there through characters like Pavel and Shmuel. John Boyne did extensive research to make sure that the story aligned closely with historical facts.