German question: Difference between "die" and "sie"?

I have sometimes seen "die" used as a pronoun where logically it should be "sie", eg "Wo kam die her?" instead of "Wo kam sie her?" What is the difference? How do I know which one to use? Danke schoen.
8 answers 8