Sludge was a heavy, sticky substance that was found on certain planets and also created as the byproduct of certain creatures. Sludge usually appeared as a thick, black substance, although other colors were possible. Sludge was somewhat similar to slime. Both substances were sometimes known in the vernacular as "goo".
Some creatures existed by living in sludge. The Bulgallian rat was one such animal. The creature Armus also appeared to have been made entirely out of sludge; however Armus was capable of manipulating his sludge to the point of even blocking communications signals. (TNG: "Skin of Evil")
Sludge could also be created artificially as a result of machinery malfunction. Miles O'Brien once found a pile of sludge in a power conduit on Deep Space 9, the result of that station's aged and failing Cardassian systems. (DS9: "In the Hands of the Prophets") Components of several ship's systems on the USS Enterprise-D were turned into sludge after nitrium parasites metabolized the nitrium found aboard the ship. (TNG: "Cost of Living")