Pilgrim's Progress is a work of religious allegorical fiction, meaning that the novel has two levels of meaning at all times—the level of the character Christian's journey from the City of Destruction to the Celestial City (or, in Part 2, Christiana's identical journey), and the deeper, spiritual level depicting an average Christian's journey to leave sin behind and reach eternal life with God in Heaven. Broadly speaking, Bunyan uses allegory to give contemporary readers an engaging, accessible picture of what a Christian's journey to Heaven is like. Christian and Christiana, then, are stand-ins for "everyman"—or "every-Christian," as the case may be.
But on a more specific level, Bunyan also uses allegory to teach his audience that the events and beliefs found in the Bible apply directly to their daily lives. For example, the vivid, easy-to-grasp image of the dusty parlor that Interpreter shows Christian is an allegory for a somewhat complex doctrinal idea key to Protestant, and more specifically Puritan, theology—that simply applying God's Law to a sinner's heart doesn't eradicate sin, but causes it to fester instead. For Bunyan, an idea like this, far from being abstract or irrelevant to his readers, was crucial to understand in order to grasp the freeing grace offered by Christ through the Gospel.
While rushing to enter the Wicket-gate on Evangelist's urging, Christian (initially joined by Pliable) accidentally plunges into a miry bog called the Slough of Despond. The visual imagery of a squelchy, muddy struggle conveys the desperation that a Christian, newly persuaded of their sinful state, often faces:
Now I saw in my Dream, that [...] they drew near to a very miry Slough, that was in the midst of the plain and they, being heedless, did both fall suddenly into the bog. The name of the slough was Dispond. Here therefore they wallowed for a time, being grievously bedaubed with the dirt; and Christian, because of the Burden that was on his back, began to sink in the mire.
The narrator observes that Christian and Pliable fall into the Slough because they are "heedless," presumably not watching carefully enough where they're going. But once they're in the bog, the surroundings fit its name, Despond, which connotes deep discouragement. The men "wallow[]," are "grievously bedaubed with dirt," and Christian even sinks. Being completely covered with mud, to the point of hardly being recognizable and being unable to keep one's bearings, is also an allegorical depiction not just of the polluting nature of sin but of what happens when a person is so burdened by their consciousness of sin that they feel trapped by it, totally helpless to pull themselves out of the dirt, much less make their way forward.
Later, after a passerby named Help pulls Christian out of the Slough, he explains why the bog has formed here:
This miry Slough is such a place as cannot be mended; it is the descent whither the scum and filth that attends conviction for sin doth continually run, and therefore it is called the Slough of Dispond; for still as the sinner is awakened about his lost condition, there ariseth in his soul many fears and doubts, and discouraging apprehensions, which all of them get together, and settle in this place: And this is the reason of the badness of this ground.
Help's explanation contains further dirty imagery, namely "scum and filth" pouring into a great ditch and accumulating into a stagnant, smelly swamp. He also deepens the allegory by explaining how, when a person feels "convicted" or convinced of their sin and "lost condition" relative to God and heaven, fears, doubts, and discouragements settle in their conscience much as mud collects and builds up in a miry bog. Help suggests to Christian that, as long as there are sinners, the Slough of Despond will always exist and pose a threat to those sinners. Some, like Pliable, will quickly grow disheartened and flee back to Destruction; others, like Christian, must rely on fellow pilgrims' help to extricate them from the muck and help them get on their way. So forewarned, readers might be able to dodge the "slough" of doubt and discouragement in their own lives, or at least recognize it when they stumble into it and not despair.
Soon after embarking on his pilgrimage, heading to the Wicket-gate at Evangelist's urging, Christian meets a man named Mr. Worldly Wiseman, who tells Christian to get his Burden removed by easier means—namely, by visiting a fellow named Legality. Worldly Wiseman's advice proves disastrous, however—en route, Christian becomes convinced that an overhanging mountain is going to fall and crush him—and an allusion to the biblical book of Galatians explains why. As Evangelist puts it,
He to whom thou was sent for ease, being by name Legality, is the Son of the Bond-woman which now is, and is in bondage with her children; and is in a mystery this Mount Sinai, which thou hast feared will fall on thy head.
Evangelist's explanation requires some unpacking. In Galatians 4, the Apostle Paul gives an allegory that hearkens back to the book of Genesis. In the allegory, the patriarch Abraham's concubine, the "bond-woman" Hagar, is associated with Mount Sinai, or the Law; and Abraham's wife, Sarah, is associated with the heavenly Jerusalem, from which salvation comes. Evangelist explains that Legality, whom Worldly Wiseman claimed could help Christian, is the bond-woman's son and therefore in bondage like her. That means Legality can't possibly free Christian from his burden—he's bound to the law (hence his name!), so how could he remove Christian's own burden of sin? In turn, the looming mountain that scared Christian represents Mount Sinai, where God first gave the Law to Moses. In short, Worldly Wiseman tricked Christian into thinking Legality was the answer to his problems, but Legality would only have compounded them. In a way, then, the dread Christian felt when he saw Mount Sinai warned him off from a more crushing fate.
The Galatians allegory is intricate and no doubt challenging for most readers to follow. However, Bunyan uses the allusion because he knows that most of his contemporary audience would have been familiar with the biblical passages involved and would have understood their theological implications. It's also an interesting example of an allegory being cited within an allegory—another instance where Bunyan uses well-known biblical allegories to subtly reinforce what he's doing more broadly in Pilgrim's Progress.
Recounting his pilgrimage to Christian, Faithful describes his violent encounter with a figure called Adam the First. The episode is an allegory that Bunyan uses to dramatize the relationship between the Law and the Gospel in Christian belief:
[...] with that he struck me another deadly blow on the breast, and beat me down backward, so I lay at his foot as dead as before. So when I came to myself again I cried him mercy; but he said, I know not how to shew mercy; and with that knocked me down again. He had doubtless made an end of me, but that one came by, and bid him forbear.
When Faithful and Adam the First crossed paths, the elderly gentleman offered Faithful work to do in return for good wages. This is the first clue that Adam the First isn't someone a pilgrim should trust. His offer of work clues readers in to the fact that he's associated with the Law, not the Gospel.
When Faithful declines his offer and turns to go, Adam the First attacks him from behind and begins beating him; when Faithful begs for mercy, Adam the First replies that he doesn't know how to show mercy. This sequence is meant to show, quite simply, that the Law is relentless. It can't save a sinner; it ultimately kills. Even if Faithful had theoretically accepted the work Adam the First offered him and managed not to mess it up, he would still fall short of doing the work as fully and perfectly as possible—which is what the Law demands. As Christian later explains, Adam the First was also Moses, the one who delivered God's commandments to God's people in the Old Testament and who doesn't know how to show mercy to those who break God's Law. In other words, the Law doesn't provide a means of perfect atonement for sinners.
The "one" who "came by, and bid [Adam the First] forebear" represents Christ, whom readers are meant to associate with the Gospel, or good news of salvation. Only Christ is able to stop Adam the First from his violence because he is the only one who has ever fulfilled God's Law perfectly—and, moreover, he died to atone for the sins of everyone who fails to fulfill it. That's why he alone can intervene with Adam the First and stop the Law from crushing Faithful. He can give the mercy that Adam the First cannot give; indeed, in this allegory, he embodies that mercy.
During the final stage of their journey to the Celestial City, when Christian and Hopeful begin to cross over the River of Death, Christian, sinking, alludes to a Psalm:
They then addressed themselves to the Water; and entring, Christian began to sink, and crying out to his good friend Hopeful, he said, I sink in deep Waters; the Billows go over my head, all his Waves go over me[.]
Christian's cry is an allusion to Psalm 42:7—"Deep calleth unto deep at the noise of thy waterspouts: all thy waves and thy billows are gone over me." The verse, with its imagery of thunderous, raging waters closing over one's head, describes the experience of a person who believes in God yet feels that God has abandoned them to destruction.
The passage as a whole is also an allegory for the experience of death. In the novel, dying is pictured as the process of crossing the River of Death to the Celestial City (itself an allusion to the way God's people in the Old Testament crossed the River Jordan to enter the Promised Land). Yet the ease or difficulty of this experience varies from pilgrim to pilgrim. Here, Christian finds the crossing so terrifying that he doubts he will arrive safely at the other side. It takes his companion Hopeful's reminders that God is just testing his faith, not abandoning him, to eventually help Christian overcome his fears.
Yet by putting these words in Christian's mouth, Bunyan also reminds readers that the experience of feeling rejected by God isn't foreign to faithful pilgrims—it's right there in the Bible, after all. That means readers, as pilgrims themselves, have a pattern to follow even in the midst of their fears—remembering that God has proven to be a faithful helper in the past and that even when one's senses tell them they're sinking under the "Billows" and "Waves," they won't be lost.