WHICH VERSUS THAT
The word which can be used to introduce both restrictive and nonrestrictive clauses, although many writers use it exclusively to introduce nonrestrictive clauses; the word that can be used to introduce only restrictive clauses. Think of the difference between
I can say the first sentence anywhere and the listener will know exactly which garage I'm talking about — the one my uncle built. The second sentence, however, I would have to utter, say, in my back yard, while I'm pointing to the dilapidated garage. In other words, the "that clause" has introduced information that you need or you wouldn't know what garage I'm talking about (so you don't need/can't have commas); the "which clause" has introduced nonessential, "added" information (so you do need the commas).
Incidentally, some writers insist that the word that cannot be used to refer to people, but in situations where the people are not specifically named, or if it refers to a group of people, it is acceptable.
“The students that study most usually do the best.”
Take a Quiz on the 'which', 'that', 'who' pronouns here.