A rag is a torn, worn, or tattered piece of clothing. Biblical usage includes both literal worn garments and figurative descriptions of what is inadequate or defiled.
Proverbs uses rags as an image of the poverty produced by drowsiness. Isaiah compares human righteousness to filthy, tattered clothing. In Jeremiah, the word refers to a worn-out garment or old cloth.