Use "which" for things and "who" for people. Use "that" for things and, informally, for people. For example: The carpet which you bought has moth damage. (A "carpet" is a thing, so "which" is correct. NB: Using "which" without a comma is unpopular, especially in the US.) The carpet that you bought has moth damage. More @Wikipedia
Hover over any link to get a description of the article. Please note that search keywords are sometimes hidden within the full article and don't appear in the description or title.