There are two known ways to purify human blood.
The first way to create purified blood, is to confess your sins to God, and ask for repentance. Once a human does this, his blood is considered purified. Sam Winchester purified his blood this way in order to cure Crowley as well as Father Thompson to cure the demon possessing Peter Kent.
Another way to purify blood is to have it blessed by a priest. In order to bless it, the priest must hold up a crucifix to the blood, and recite "Hunc sanguinem sacro, et donantibus sanguinem, debita dimitto. Dolorem remitteat et voluntati dei serviat." In English, this means "I bless and offer this blood and release the debt. It shall ease the pain and serve the will of God." This version of purified blood is shown to be more painful for the demon though its possible this was because the demon was a Knight of Hell and or had the Mark of Cain. It was used when Sam cured Dean and unlike the purified blood created by confession, it didn't seem to need to be injected each hour and was the only part of the Demon Curing Ritual required besides the consecrated ground.
Max Thompson, a member of the Men of Letters, was a priest who experimented on demons. He believed that demons could be made to repent and thus could be cured and reverted to humanity. He formulated the procedure on curing demons, which required purified blood. The blood was then injected into the demon during interrogation. Several doses of the purified blood was required before the demon began to feel the effect. After being infused with a significant amount of purified blood, the demon began to feel repentant.
Max Thompson performed this ritual, along with a modified incantation of the exorcism chant until he successfully managed to cure a demon. This was documented in video clips kept by Father Simon, who handed the files to the Winchesters. The hunters later kept the clips in the archives of the bunker of the men of letters.
Another way to create purified blood is to have a priest perform a blessing over it. Sam Winchester had a priest do this while posing as a doctor at a hospital then stole the purified blood rather than use his own. Since Dean was a Demon inhabiting his own body Sam could not use his purified blood as he may not be the same blood type as Dean, something Dean would need if the ritual was a success.
Sam Winchester attempted to cure Crowley as the third trial to close the gates of hell. Like Father Thompson, Sam infused several shots of his purified blood into the King of Hell, which caused Crowley to repent for his sins, asking the hunter where to start to ask for forgiveness. While he completed that part of the ritual, he didn't finish the job as Dean learned it would kill him.
Crowley is shown to still be affected by the ritual and the purified blood: while he's mostly reverted to a demonic state, he still retains human emotions and an addiction to human blood.
After capturing Dean, Sam uses purified blood created by a priest performing a blessing over blood in a hospital to cure him of being a demon. However, the more human he becomes, the less susceptible to the devil's trap he is and he briefly escapes before being recaptured by Castiel. Sam finishes injecting him with the purified blood and while he doesn't complete the ritual, its enough to cure him.
- Confessing appeared to purify even the blood of a human who has been infused with demon blood, as evidenced with Sam Winchester.