There are two broad categories in fantasy where an act of flaying might be referred to.
1. The most famous in art history is probably the iconography (> Icons) devoted to the musical contest between the Satyr Marsyas and Apollo. Marsyas has been jinxed into hubris by the fact that his flute was made by Minerva, who then, however, cursed it. In his contest with Apollo, judged by the partial Muses, he is foredoomed to failure – as mortals tend to be when they compete with their deities – foredoomed to pay whatever penalty Apollo imposes for his pride at his skill with the flute. The penalty is to be skinned alive. Being flayed is thus what happens to mortals who contest with the gods.
2. The second broad use relates to the Magic belief that to wear the hide of a skinned animal or victim is to acquire its numen or strength. This is far from an exclusively Western idea: something very similar was important in the religion of the Aztec/Toltec people; a good example of this being explored in fantasy is Graham Watkins's The Fire Within (1991). One old Christmas ritual involves skin-wearing in order to gain (symbolically) "contact with the sanctity of the sacrificed victim", as Clement Miles puts it in Christmas in Ritual and Tradition (1912). The Mythagoes in Robert P Holdstock's fantasies might well wear hides for this reason. Such transference of power probably underlies the wearing of skins – animal or human – by Dark Lords or their minions, an example of this anthropologizing in a Dark-Fantasy context being the Magus Ralli-Faj – in A A Attanasio's The Dark Shore (1996) – who manifests himself as "a gray stick upon which [hangs] a wrinkled empty skin of brown leather flayed from a human body". Skin-wearing is a route to Shapeshifting, as with "swan-maidens" who take on swan-form by donning a garment of feathers: examples appear in James Branch Cabell's Figures of Earth (1921) and Poul Anderson's Three Hearts and Three Lions (1961). (>>> Selkies.)
This transference of the essence of the victim can also be seen in the use of a skinned hide as a drum: in Gustav Meyrink's Walpurgisnacht (1916) the Mirror character who had occultly inspired an apocalyptic World War I revolution in Prague afterwards has himself skinned with the instruction that his hide be made into a drum. When beaten, the drum will call the folk to arms. [JC]