Which: the nondefining or nonrestrictive relative pronoun. Use »which« when the information in the relative clause is not essential to the meaning of the sentence.
»The book, which is about the frontier, was long enough to keep me occupied during the entire bus trip.«
That: the defining or restrictive relative pronoun. Use »that« when the information in the relative clause is critical to understanding the sentence.
»Bring me the book that is on the table, not the one that is in my briefcase.«