Many otherwise good writers no longer distinguish between “that” and “which.” Strictly speaking, however, “that” and “which” are not interchangeable.
Use “that” for restrictive clauses:
The bird that rose at 6 o’clock got the worm. [The clause “that rose at 6 o’clock” restricts the noun by indicating that only a certain kind of bird gets the worm.]
Use “which” for non-restrictive clauses:
The early bird, which rose at 6 o’clock, got the worm. [The clause “which rose at 6 o’clock” is a non-restrictive clause; we don’t need the clause to know who gets the worm.]
Hint: Use “which” if you can insert a comma before “which.” Use “that” if you cannot insert a comma.