Ghouls are HardmodeUnderground Desertenemies who follow the Fighter AI (behaving similar to Zombies). Ordinary Ghouls spawn inside the normal Underground Desert, the Vile Ghoul inside Corrupt parts of the Underground Desert, the Tainted Ghoul inside Crimson parts of the Underground Desert, and the Dreamer Ghoul inside Hallowed parts of the Underground Desert.
The Hallow and Corruption/Crimson variants inflict debuffs which can make exploring the Underground Desert dangerous even with pre-Plantera equipment, but can be easily avoided if approaching the enemy with care.
While a ghoul is a common enemy in many games, it is fitting that the Terraria version appears in Desert biomes. The ghoul's origin can be traced back to Arabic stories of monsters that feed on the flesh of desert travelers and desecrate the tombs of the buried.
It appears that the Corruption/Crimson and Hallowed versions have a liquid dripping down their chin while the normal version does not.