Pilgrim's Progress is a religious allegory and a work of fiction. As an allegory, the novel is meant to be read on two levels at the same time, with its surface story offering an engaging adventure and its underlying spiritual meanings offering religious instruction and edification. The novel fits into a longstanding tradition of Christian literary allegories, going back to Dante's Divine Comedy and William Langland's Piers Plowman in the 1300s, as well as the allegorical morality play, Everyman, which was written by an unknown author in the late 1400s.
Like all of these works, Pilgrim's Progress is concerned with the ultimate fate of the human soul and the obstacles that soul faces en route to its eternal destination; and like them, it does so by overlaying its plot onto a world its original audience would find strikingly familiar, in this case 17th-century England. Like Everyman, in particular, Pilgrim's protagonists (Christian and Christiana) serve as "every-pilgrims," fairly flat characters who stand in for any and every reader rather than developing into fully rounded characters.
But this work of allegorical fiction also notably fits into the broader genre of English Puritan religious literature, which was quite substantial. While much of this literature took the form of theological treatises and sermons that could be very dense and difficult to read, Pilgrim's is unique in its entertainment value and accessibility, as Bunyan tried to convey profound theological ideas in a way that everyday readers (even children and those lacking formal education) could understand and take to heart.