The Ritual is what fairies have to complete to replenish their magic. It involves picking an acorn from an ancient oak tree next to a riverbend, then burying it in another spot, saying "I return you to the earth, and claim the gift that is my right." After they complete the ritual, their magic is restored. Having full magic is called "running hot" by fairies. This is when they are most dangerous. In the original Artemis Fowl, Artemis and Butler capture Holly Short while she was completing the Ritual after a close encounter with a Troll. She was unable to escape since she had used the few drops of magic she had left on it.
Later in the book, Holly realizes that her acorn slipped into her boot, but is in a freshly concreted cell. She manages to take her cot and slam it into the ground multiple times to have a deep enough hole. She plants the acorn, restores her magic, and escapes into Fowl Manor, mesmerizing Juliet Butler, and causing general annoyance in her wake.
Alternative Ways of Replenishing Magic and variations to the Ritual
It is implied that demon warlocks do not have to perform the Ritual, and that they either have an infinite supply of magic, or it regenerates with time. It is also implied that after her consuming of animal fluids to boost her magic, Opal Koboi does not have to perform the Ritual. Koboi does not have infinite magic, it was stated that she needs to sleep to replenish her magic. This effect was undone over time as by the fourth novel (which is later in the time line), she is no longer able to replenish magic through sleep. The Ritual still works if there is no full moon, but the fairy does not gain as much magic, they also do not have to put the seed in the earth right where the oak tree is, it can be anywhere on earth, even when earth is covered in snow. Foaly created a device called a Sealed Acorn Unit that if an acorn is placed within, by burying that acorn, the Ritual still works (normally there is a time limit of a few hours), but it is banned. Nevertheless, Holly uses one during The Arctic Incident and The Lost Colony.
In The Time Paradox, before they leave into the past, N°1 uses some of his own magic to replenish Holly Short's magic. He calls it the 'N°1 Cocktail'.