After Hamlet has killed Polonius and hidden the body, he's being purposely difficult in refusing to reveal where the body is. The king, his uncle, tries to press him for an answer, and Hamlet is acting mad in response. At this point, he says that "a king may go a progress through the guts of a beggar" (4.3.34-35). This line is a paradox, which means that it is a statement that seems like it cannot be true, and yet it is nonetheless. How could a king possibly go on a royal journey through a beggar's guts?
However, Hamlet's earlier line helps us to understand; he said, "A man may fish with the worm that hath eat of a king and eat of the fish that hath fed of that worm." In other words, after a king dies and his body is eaten by the worm, a beggar might pluck that worm from the dirt and use it to catch a fish. Then, that beggar would eat the fish that ate the worm that ate the king, and in this way a king could go on a progress through the guts of the beggar. Once we understand the role of the worm and the fish, the paradox makes sense.