Note: We thoroughly discuss the differences between that and which in the eBook Developing a Powerful Writing Style.
Both words introduce adjective clauses, which modify nouns or pronouns.
That is the restrictive or defining relative pronoun, which the nonrestrictive or nondefining. Use that when the words following define or single out the noun being discussed. In the sentence, “The car that was parked had the most damage,” you could not identify the specific car being discussed without the words following that.
Which is used when the words following further describe the noun and the noun has already been identified. In the sentence, “She owned the other car, which was only slightly damaged,” you have already identified the car as the other one. The words “only slightly damaged” simply give more information about this car.
Always set off which clauses with commas.
Example: The book that his professor listed in the syllabus was required reading in his Spanish course, which he took during his first year in college.