Evolved from "on the rag" meaning having one's period, to "rag" meaning a woman who is having her period, to "rag" just meaning any woman in general.
DISCLAIMER: Women tend to find this term a bit offensive. Calling a woman this may slightly decrease your chances of getting laid.
Girl: (smacks him, pours beer on him, and leaves)
girl 2: She's on the rag.