You should use who only to refer to people, while the pronouns that and which should refer only to non-human things and never to people. “Mary is the one who attends often.” “The dog that won the show was a terrier.” “The car that won, which happened to be a Ford, was green.”
An exception to the who-rule is the whose form of the pronoun, as in, “The apple whose skin was a bright green was not ready for eating.” Whose may be used to refer to a person or an object other than a human.
That is restrictive which means that its phrase cannot be removed from a sentence without destroying the sense of it. “The door that you need to open is the one painted purple.” If “that you need to open” is removed, the sentence is meaningless; the phrase is restrictive.
Which on the other hand is non-restrictive in that its clause can be removed without affecting the meaning of the sentence. “The dog, which is named ‘spirit’, is of a very rare breed in this country.” The name of the dog may add color to the sentence, but removal of the clause will not will not render the sentence meaningless.
Note further that if the clause begins with which and is non-restrictive, it should always be set off with commas. The contrary is so with a restrictive phrase or clause; it should never be set off with commas because it is integral to the sense of the sentence, and to do so would be to demean its importance.
A couple rules-of-thumb: First, if you are unsure whether a phrase or clause is restrictive, it probably means that it is not. Second, if you mentally insert (“by the way”) after the pronoun, and it makes sense, it is likely to be non-restrictive. From above: “The car that won, which (by the way) happened to be a Ford, was green.” On the other hand, “The door that (by the way) you need to open is the one painted purple” does not work because to remove the clause would be to rob it of its meaning.
-Ken Butera