In North American English, that is used for retrictive clauses (it restricts the meaning of the noun it modifies), whereas which is used for non-restrictive clauses (it doesn't restrict the meaning of the noun it modifies). For example,
 A suitcase that has no handles is useless.A restrictive clause is an essential part of the sentence it sits within. Omit it and the sentence changes in meaning:
 A suitcase is useless. <Are suitcases really useless?>A non-restrictive clause is not an essential part of the sentence it sits within. Omit it and the sentence doesn't change in meaning, because which means by the way:
 The broken suitcase, which (by the way) also has no handles, is useless.Now, let's omit the non-restrictive clause:
 The broken suitcase is useless.The sentence's core meaning doesn't change.
Does that help so far?
Try here also, World Wide Words: Which versus that
Student or Learner