British and American style differ a bit. As an American, I use "that" or "who" whenever I can and the relative pronoun "which" only when necessary. (Use "who" instead of "that" or "which" when referring to a human being.) Examples:
1. The color that I like best is
2. The man who telephoned me yesterday
3. The thing that is hardest to understand is
Note that the word "that" can often (but not always) be omitted:
4. The color I like best is
So when should you use "which"? You use it when the information in the which-clause is extra or optional, rather than essential to the meaning of the sentence. Usually, in addition to using "which," you also use commas or parentheses in such cases:
5. The color, which I had never seen before, was a bright blue
6. The explanation (which is not easy to understand) is that
You cannot use "that" in sentences 5 and 6.
The word "which" can also be an interrogative pronoun:
7. Which color do you like best?
As an interrogative pronoun, "which" cannot be replaced by "that."
Notice the difference between the following two sentences:
8. The cats that live in the basement ...
9. The cats, which live in the basement, ...
In 8 you are talking specifically about the cats that live in the basement. In 9 you are talking about "the cats" and adding as additional, optional information that they happen to live in the basement.