From Discworld & Terry Pratchett Wiki
A gnoll can be very crudely described as a fermenting heap of rubbish. They obsessively collect rubbish, and possibly eat most of it; what's left is carried around, and gives gnolls their smell. Some gnolls are street-cleaners in the employ of the rubbish-collecting recycling mogul, Mr. Harry King. Few people know the real form of gnolls beneath the rubbish, but gnolls are considered humanoid because they are intelligent, can speak, and can be hired. Since a gnoll is effectively "masked" by his rubbish heap, William de Worde suspected that some gnolls keeping an eye on him in the streets are in fact employed by the Watch, not his creditor Mr. Harry King (see The Truth). This may be the truth: in Jingo, Carrot Ironfoundersson is seen to have a gnoll called Stoolie on his list of regular informants, who will do odd jobs for the Watch in return for advice on, for instance, where to find the best decomposing ex-seabirds.
Gnolls are referred to in Equal Rites, when Eskarina Smith is trying to work her passage to Ankh-Morpork with a trading caravan, whose leader is desperately worried about the perils to be found in the hills. One of which is an infestation of raiding Gnolls, who are described as "a variety of stone-goblin" and as "wiry and wickedly armed". They also practice hospitality of the red-hot knife and bludgeon variety on any travellers they capture. They come across as kindred to Tolkien's Orcs or Geronimo's Apaches: you really would not want to be taken alive by them. There is also a passing reference in The Colour of Magic to Hrun the Barbarian being engaged in a pitched battle with them, but he is temporarily thrown off balance by the psychic weight of a lie told about him by Rincewind.
Evidently, the concept of the Gnoll has changed across the course of the books, from something akin to Tolkien's Orcs, to the shambling ambulatory compost heaps seen in later books.
It has been suggested that Gnolls may be another subspecies of Troll along with Gargoyles. Turtle Recall describes them as a softer variety of Troll, whilst GURPS Discworld states that they are Trolls except that they grow thick matted hair.
Something of the originally intended viciousness comes out in Stoolie's acknowledgement of Carrot's description of his working practices:
You pick up this, you pick up that, maybe bash it against a wall till it stops struggling-
"'s a vile acur'cy" said the gnoll. There was a bubbling noise that might have been a chuckle.
The name Gnoll derives from a creature in Dungeons and Dragons; the (possibly mythical) origin of the creature in 1st edition is as a half-breed between gnomes and trolls (D&D varieties thereof, not Discworld, before your mind boggles too much). Why a game that already had kobolds, goblins, hobgoblins, orcs, ogres, trolls and giants needed another kind of horrible humanoid is unknown. It was revised from the second edition into its iconic form, a particularly and malicious breed of anthropomorphic hyena embodying all of that race's negative mythological traits, including an appetite for humanoid flesh, practicing slavery and a hatred of all other species.
GURPS Discworld suggests gnolls are a form of troll that is formed of dirt, rather than rock. This would certainly account for their junk-hoarding preferences and smell.
For a people on Planet Earth who fulfil a Gnoll-like function in a city that must share some of the smells of Ankh-Morpork, and where real-life Harry Kings must surely exist, read this article on the Zabbeleen of Cairo, Egypt: 
"The Gnoll" is the playing ground of English Rugby Union team Bristol. Big, shambling, hairy creatures knocking lumps out of each other? Perhaps a step too far...
Gnolls began as savage and independent beings in The Colour of Magic, yet recent books have portrayed them as little more than junk hoarders, living and moving mounds of garbage covering the small gnoll itself. This echoes the fall of the Native Americans, who were forced into settlements or into the lowest rungs of society by European settlers. Given the Gnoll diet (anything that doesn't move, and even then there are rumors), however, it is entirely possible that the gnolls prefer this change instead of chafing at it, as did the Native Americans.
Pratchett's gnolls also bear some resemblence to a number of stooped, hoard-hauling creatures encountered by the heroine of the motion picture Labyrinth. These beings carried huge piles of rubbish on their backs, apparently out of sentiment; the heroine is implied to have narrowly escaped becoming one herself.
Gnolls as Wombles?
It occurred to me on a different forum while likening the otherwise blameless refuse collectors of Stockport, England to gnolls, that the ol' Pratchett sense of mischief might be at work here. There are so many sly references in the Discworld to the sort of British TV children's shows that people of our age (35-55) might have watched as kids, that if TP wasn't thinking of a VERY obvious association, he's missed a gag here.
In gentler places, such as Wimbledon Common, the evolutionary niche for refuse collection and pickers-up of unconsidered trifles is occupied by warm, cuddly, inoffensive, mammalian creatures called Wombles, who live a blameless communal underground lifestyle based on making good use of what Nature provides/Things that most everyday folk leave behind.
But how long would a Womble last in Ankh-Morpork? (Indeed, even on Planet Earth, the postulated low-level scavenger living on the leavings-behind of the human race has to be tough, as the Nomes of the Bromeliad trilogy demonstrate.)
Try redesigning a Womble for Ankh-Morpork... you might end up with something humanoid, but there the resemblance ends. Something tough, reptilian/scaly, bloody-minded, indescribably smelly, habitually filthy, and with a robust attitude to the useful-but-not-quite-dead-yet... in a word, a Gnoll...
Actually, the author Michael de Larrabeiti has already redesigned the womble as a nasty customer, witness the "Wumbles" in his Borribles stories.