They are seven letters P that the gatekeeping angel writes on Dante's forehead, with the point of his sword, as he opens the gate of Purgatory, in canto IX: one for each sin that the mountain will wash away. The common reading takes the letter as the initial of "peccato," the Italian for sin.
Before the inscription, Dante climbs three steps of different colors: one of white marble so polished that he sees himself in it as he appears, a darker one than violet-black, of rough and cracked stone, and one of crimson porphyry like blood gushing from a vein. He throws himself at the angel's feet, strikes his breast three times and asks for mercy. The angel carves the P's, tells him to have them washed once he is inside, and takes out from beneath an ash-gray robe two keys, one gold and one silver.
The rule of the gate has a generosity and a condition: it is better to err by opening than by keeping shut, provided one prostrates oneself, and whoever looks back is sent back out. Dante obeys it: he hears the gate close behind him and says he would have had no excuse if he had looked back.
The P's serve as a measure of the climb. The first is erased at the end of the ledge of pride, in canto XII, and Dante discovers it only with his fingers, finding just six letters on his forehead. Virgil smiles and explains that when all have been erased, the feet will be overcome by good will and climbing will be a pleasure. Farther on, the angels of the other ledges scrape away those that remain.