Who and that are used when referring to people. Who is for a person or the individuality of a group and that is used when you’re talking about a class or type.
Which and that refer to places, objects, and animals. Which introduces nonessential clauses which could be removed from the sentence and not change its basic meaning, and that introduces essential clauses.
Keith’s car, which is a red sports car, was stolen last week.
Keith’s car that was stolen is a red sports car.
For my animal loving friends, you will be happy to note who is now often used when a pet is identified by gender or by name.
It is also now appropriate to use either which or that to introduce an essential clause. Which is preferred when (1) there are two or more parallel essential clauses in the same sentence, (2) thathas already been used in the sentence, or (3) the essential clause is introduced by this . . . which, that . . . which, these . . . which, or those . . . which.
Mary is working in a law office which is what her education has prepared her for and which was her dream job all through high school.
That is a restaurant which you must try.