An allegory is a story that has another meaning or meanings below the surface meaning.
On the surface, The Trial is the story of a banker named K who is arrested on his thirtieth birthday. He doesn't know what the charges are and nobody seems to be able or willing to tell him, so he fights for his life in a strangely dreamlike state where nothing seems to make real sense.
Beneath this surface, the novel is political allegory about the modern bureaucratic state. The political allegorical meaning of the work is that the state has grown so powerful that it operates according to a logic of its own that alienates it from the realities of human life. The novel is a critique of the modern state, in which the bureaucracy—including the legal system—serves itself rather than doing what it was intended to, which is serve the people.
K actually never has a proper legal trial. Instead, his "trial" is what he undergoes while trying to make sense of his senseless situation. His plight becomes an allegory for the way modern individuals are alienated from a state bureaucracy that can't fully comprehend them on a human level.
In the end, K's execution for reasons that are incomprehensible is an allegory for the way modern nation-states can impede or destroy the lives of citizens.