A metaphor can be defined as a figure of speech that describes an object or action in a way that isn't literally true but helps explain an idea or make a comparison. In The Boy in the Striped Pajamas, fences are used in both a literal and a metaphorical sense. Literally, Bruno and Shmuel are divided by a fence that separates the inmates of Auschwitz from the outside world. The Jews are on one side of the fence; their German oppressors are on the other.
In metaphorical terms, the fence represents the enormous gulf between Bruno and Shmuel, between the Germans and the Jews. Yet it is a wholly artificial barrier based upon an equally artificial divide between human beings on the basis of supposed racial differences. The fence stands as a metaphor for how we often separate ourselves from each other on the basis of race, religion, gender, or sexuality. It also illustrates how those with power often use such artificial barriers to maintain control over those they deem inferior to themselves.