Which, like what, refers to things. But which refers to things of which there is a limited number, whilst what refers to things of which there is an unlimited number.
Which, like what, can be followed by a noun phrase, e.g. "which classroom..." or "which red car...". We can also use it with of, e.g. "which of the red cars...". It can also be used without do support, i.e. with hidden do if which refers to the subject, e.g. "which car drove away?" (="which car did drive away?). This is similar to what, who but not how, when, why, or where.
Witch is a homophone with "witch", so "which witch is which?"