'That' is used to begin restrictive or defining clauses. 'Which' is used to begin restrictive and non-restrictive (defining and non-defining) clauses. The words also appear in various other situations unrelated to comparing them.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.