A hard life has taught me to be prepared. I, long ago, secreted within my person a wee casket of powerful magic. When the spell inside me sensed my life force ebbing, it went to work. And I was revived.
The Resurrection Charm is a subdermal sachet of powerful magic that is sewn into a person's body. Once the spell senses the life-force of the individual ebbing, the magic kicks in as a purple glow and works its way through the body, repairing and resurrecting the individual. The resurrection and healing power of the spell is not instantaneous, however; the more severe the death, the longer the body will take to recuperate. Each time the charm is used, its power needs to be recharged before the process can be repeated. However, the spell only acts as a fail-safe and must be implanted in advance as it activates when the individual's life force is fading. It cannot resurrect someone who has died without the charm implanted within them beforehand.
While healing Amara, Rowena reveals to her that after Lucifer snapped her neck, a casket of powerful magic she had sewn into her thigh was activated once her life-force began ebbing. As the magic worked its way through her body, it repaired her broken neck, bringing her back to life.
After being found out by the Winchesters, Arthur Ketch tells the brothers how he came to still be alive after being shot in the head. Years ago the British Men of Letters captured Rowena, and during her interrogation, Ketch learned of the resurrection charm. He struck a deal with Rowena, having the charm sewed into his body in exchange for letting her escape. Resurrecting soon after his body was dumped, Ketch went into hiding, as the British Men of Letters frown on desertion. He also began searching for Rowena, explaining that once the charm is used, it must be recharged before it can work again.
Rowena tells the Winchesters that after Lucifer burned her alive, the healing process took a long time. Rather than risk being murdered by Lucifer again, and undergo the same plodding healing process, Rowena is seeking the Black Grimoire to lift the magical bindings placed on her by the Grand Coven so that she can protect herself.
After Mary Winchester's death, Sam and Dean decide to turn to Rowena for help due to her experience in using the charm for her own resurrection and Rowena's possession of the Book of the Damned. When Jack Kline arrives for the same purpose, Rowena explains to him that she can't use the charm to resurrect Mary as it only acts as a fail-safe and must be prepared and implanted in advance.
As Rowena prepares to sacrifice herself, she cuts her last resurrection sachet out of her shoulder.