Ghouls are of Arabic origin, sorts of humanoid-like demons that rob graves and eat dead flesh. They are closer to Oni and Gaki of Japanese folklore than they are to the typical undead.
Ghoul is a desert-dwelling, shapeshifting demon that can assume the guise of an animal, especially favoring jackals, hyenas, and coyotes, some can even assume the form of crows or vultures. They lure unwary people into the desert wastes or abandoned places to slay and devour them, which gives them the magical ability to assume the illusory guise of people they have consumed since the last new moon.
They live underground and “know the secrets of the dead”, they will cast speak with dead to learn secrets from those that have died, and will also do so for a price, especially to the factions of the underworld from the nearby cities. Ghoul magic, involves special secret rituals that allow them to extract information even from unwilling subjects (a metaphysically evil act).
Ghouls are not technically undead, they have not died and are not the result of death. Instead ghouls are the result of humanoids performing dark rituals of cannibalism that alters their bodies transforming themselves into monsters powered by necromantic forces. It is actually a sort of magical disease (prions) like lycanthropy.