Sometimes ghouls get lumped together with zombies. They're dead, they eat flesh, they're just a bit meaner, right? Well, zombies happen because of external circumstances (spells, curses...) and are mindless, so that's not right. They're not the same as revenants, another species of intelligent undead, since they're not motivated by revenge, anger or any sort of emotion.
The ghoul rises from the dead because it's hungry.
Those who practice cannibalism risk becoming ghouls. Now, this seems like an easier path to immortality than, say, discovering the philosopher's stone or going through all the tedious rituals to become a lich. Just eat a few orphans and homeless people and that's eternity for you, baby. An eternity of being hungry. But if you're the sort of person that would happily chow down on your fellow man, then you're probably not the type to be disappointed in the results. You don't get magical powers, but you get some poisonous claws so that's neat I guess?
Did a buncha research on ghouls, because I know they're a folkloric beast that's undergone quite a bit of transformation over time. I already knew they were an Arabic beastie (a ghûl), with them appearing in the Arabian Nights stories -- spooky monsters what hide in graveyards and eat corpses. What I didn't know is that that version of the ghouls are a mistranslation-slash-fabrication by the translators of the original texts. Early ghouls were more like demons or evil jinn that lived out in the desert and lured travelers to kill them. They were also often feminine, shapeshifters, and used as boogeymen to scare kids. Pretty much a generic monster that appears in every culture in the world.
But the Westernized version has stuck so that the ghoul as a skulking male/genderless grave-robber functions as today's definition. Lovecraft went in a bit of an interesting thing with them, making them appear less and less human the more time the ghoul has spent unalive.
Happy Spookoween, peeps.