Virgil is the shade of the Roman poet, author of the Aeneid, who appears to Dante in Canto I and leads him through Hell. Dante recognizes him as his master and his author, and Virgil lives in Limbo, among the virtuous who were not baptized.
When he appears before Dante, who recoils from the she-wolf, Virgil presents himself as a Mantuan, born under Julius and raised in Rome under Augustus, and proposes another path: to guide Dante through Hell and hand him over, to ascend, to a soul more worthy. He explains that he himself cannot enter the city of God, because he was rebellious to its law. In Canto II he tells Dante why he came: Beatrice called him from Limbo and sent him.
In Hell, Virgil does four things. He explains, in Canto XI, the order of the circles. He silences the guardians with the same formula, "It is willed thus there where one can do what one wills." He protects Dante, covering his eyes before Medusa and carrying him like a mother who flees the fire with her child, in Canto XXIII. And he reproves him when he weeps before the soothsayers or listens with relish to a quarrel of forgers.
The poem also shows the limits of the master. The gates of Dis are closed to him, and an angel is needed to open them; in Canto XXIII a friar reveals to him that Malacoda lied; and in Canto XXXIV he pants, clinging to the hair of Lucifer. He is a guide who teaches up to where his reason reaches, and the journey shows where that reach ends.