| That restricts the reader's thought, directing attention to a specific bit of information to complete a message's meaning. Which is non-restrictive and introduces subsidiary rather than essential information to the meaning of the sentence.
Important note involving which: Non-essential does not mean that the information is not important or that it's not relevant. It just means that it's not essential, grammatically, to the meaning — the central understanding — of the sentence.
The lawnmower that is in the garage needs sharpening.
We have more than one lawnmower. Only the one in the garage needs sharpening.
The lawnmower, which is in the garage, needs sharpening.
We have only one lawnmower. It's in the garage and needs sharpening.
The statue that stands in the hall is on loan from the museum.
A number of statues are in the building. Only the one in the hall is on loan from the museum.
The statue, which stands in the hall, is on loan from the museum.
Only one statue is under discussion. It is on loan from the museum and happens to be in the hall.
Restrictive clauses (that) modify, focus and limit. Because the information they supply is essential to the intended meaning of the sentence, they are not set off by commas.
Non-restrictive clauses (which) do not limit the words they modify. They simply add information that otherwise would not be provided. Non-restrictive clauses are set off by commas because the information they provide is supplementary, not essential to the meaning of the sentence.
But there's who, too
Restrictive and non-restrictive clauses need not begin with that and which. For example, if humans or animals with names are being discussed, who may become the appropriate choice for both kinds of clauses. In such cases, a comma all by itself can transform the meaning of the sentence.
He helped the native guides who were sick with malaria.
No comma appears before who. Therefore, what follows is a restrictive clause. Not all the guides had malaria, and we helped only those who were sick with malaria.
He helped the native guides, who were sick with malaria.
Putting the comma before who makes what follows a non-restrictive clause. It also changes the sentence to imply that we helped all the guides and all of 'em were sick with malaria.
Got it? I hope so (the concept of restrictive/non-restrictive, that is — not malaria.)
No who or which or that?
Restrictive and non-restrictive elements are not always introduced by relative pronouns. Sometimes they simply are treated as essential (restrictive) or non-essential (non-restrictive) elements. In such cases, too, the comma is crucial to the meaning.
He went downtown to pick up his wife, Judy.
The addition of the non-restrictive element here merely provides us with the name of his wife — his only wife. Because he has but one wife, her name is not essential to the reader in identifying her. Therefore, it makes it non-restrictive or non-essential to the meaning of the sentence and is set off by a comma.
He went downtown to pick up his wife Judy.
The omission of the comma creates a restrictive clause, of course. Now we are implying that he's a bigamist or lives in a culture that allows more than one wife.
My brother, Ken, worked for a TV ratings company.
This indicates that I have but one brother and his name is Ken. Because I have but one brother, his name is a non-restrictive element or non-essential to the meaning of the sentence. You don't need his name to know the exact person I'm talking about. Therefore, it is set off by commas.
My brother Ken worked for a TV ratings company.
Ahhh, this says I have more than one brother. And it's essential to know his name, otherwise you, the reader, wouldn't know which brother I'm talking about. So, no commas!
(Whereas, the commas around the reader in the above sentence are needed because the reader is non-restrictive -- not essential in identifying yourself to you! Got it?)