Many people write which when it should be that and vice versa. It’s not the end of the world if you get it wrong because the reader might still understand you, but the meaning of the sentence could change drastically if you do.
The two words represent different clauses. The pronoun that is appropriate to restrictive clauses while which, usually preceded by a comma, is about non-restrictive ones. A restrictive clause is one that limits, or restricts, the scope of the noun it is referring to as opposed to a non-restrictive one.
The following examples, giving instructions on how to get to a certain house, show the difference between restrictive (that) and non-restrictive (which) in more detail.
“Go to the third house that is red and knock on the door.”
“Go to the third house, which is red, and knock on the door.”
In the first example, the meaning is restricted to a house of a certain colour. Not only that: you need to count the first two red houses down the road before you come to the third one. Because your instructions are so specific, you may end up walking past rows of buildings before you get to the right house.
In the second example, the clause is non-restrictive. It doesn’t limit the scope of the noun. Here you simply stop at the third house, which happens to be red. The colour is an additional piece of information, which is helpful but not necessary to know. The clause “which is red” can actually be taken out and you’d still arrive at the house in no time.
I welcome your comments.