Figuratively, the previous answer is absolutely correct. Literally, it describes an animal afflicted with mange mites which cause the animal to scratch until its fur falls out and its skin is raw.
Mange is a skin disorder, usually seen in dogs. The term has become a slang insult. Here are some sentences. "That mangy dog just stole my horse!" the cowboy yelled. Rover's mangy skin responded to...