While it would be much easier to answer what a ghoul is, I find your question intriguing. In literature and the imaginary, ghouls are often employed by more powerful evil creatures to do their bidding. They may be brought to life from corpses or created by powerful magic. Generally, their existence forms from the wants of some evil being to terrorize the living.
Ghouls usually have sharp claws for hands and, in Arabic lore, hooves for feet. They murder unsuspecting folk and dig up rotting dead to feast on them. While ghouls wouldn't be considered intelligent or have any individual purpose, they are an awful tool for those who determine to send these foul creatures ahead of their own unwanted arrival.