They have same pronounciation in Chinese, "shéi" or "shui". (谁)
They are different when you use them.
In Chinese, “谁" is sometimes used as a accusative word, it can be also used as a subject.
For example, 那个男孩是谁?(accusative) Who is that boy?
谁给你的那本书?(subject) Who gave you the book?
It may different in English.
Another example, The answer depends on whom you ask. (答案取决于你所提问的对象。)
Who are you talking to? (你在跟谁说话?)