Ghouls are one of the least consistently portrayed creatures in fiction, partly because the phrases "ghoul" and "ghoulish" are poorly defined terms that can refer to anything or anybody interested in the macabre and morbid, giving writers the ability to name almost any cannibalistic, flesh-eating or just creepy monster after them.
In general, ghouls tend to be strongly associated with cannibalism and man-eating; they will usually be either ravenous predators of living people, corpse-eaters or both. They are often also treated as degenerate beings, created when something else — typically a living person, sometimes a stronger or more refined undead creature — somehow "decays" into a more primitive or corrupt state. The two things can sometimes be tied together, with an initial act of cannibalism being what causes a person to degenerate into a ghoul. Other times, this corruption can come in the form of an undead infection, a plague or any of a myriad of other causes.