But to answer your question, Jim.

First, "that" has three different functions. It's a demonstrative pronoun--for instance, "That dog is brown, but this one is brindled." Like any pronoun, though, it can also stand on its own--"I knew that!" There's an implied antecedent in such a statement, but if the statement appeared in a real sequence of sentences, the antecedent, what the "that" refers to, would be obvious. So imagine a sentence just before "I knew that!" where someone says, "The US is a democracy."

Second, "that" is also a relative pronoun, and in that role it introduces relative clauses. The relative pronoun has to have an antecedent in the sentence where the clause appears--for instance, "Here is the house that Jim bought," where the "that" refers back to "house." As is true of all clauses, the whole of the clause acts as a modifier, an adjective in the case of relative clauses--in the example, the clause, "that Jim bought," modifies "house" and specifies which house in particular the sentence is about. There's a little rule as to when you'd use "that" as opposed to "which" in such clauses, but the distinction has become less and less employed, so that it's beginning to disappear as an active rule. Still, here goes: "that" is used in restrictive relative clauses, and "which" in non-restrictive relative clauses. A restrictive clause is one where the modification defines the object in an absolute and necessary way. So "Here is the house that Jim bought" is an example of a restrictive clause because the relative clause defines absolutely which particular house it is that I visited. The clause, in other words, really expresses the central point of the sentence. By contrast, I could have said something like "I visited the house, which Jim bought, so I could assess its market value." The relative clause here is non-restrictive because what the clause says is incidental to the central meaning of the sentence--in fact, the clause is really a parenthetical remark. Notice that non-restrictive clauses are set off by commas, but restrictive clauses are not.

As I said, though, the distinction has more or less disappeared--a shame, I think, since there are contexts in which the difference can be really significant.

Finally, "that" is also a subordinating conjunction. Subordinating conjunctions introduce another kind of subordinate clause--in the case of "that," a substantive clause, which means that the clause acts as if it were a noun. Here's a substantive subordinate clause: "I know that tomorrow is Monday." The whole of the subordinate clause acts as if it were a single noun, the object of the verb "know" (compare "I know Jim"). Almost all other subordinating conjunctions can be substantive but are almost always adverbial. For instance, "However I came to live in the US is a story of high adventure" has the "however . . . US" as a substantive subordinate clause, which acts as the subject of "is." But "John makes a living however he can" has the "however he can" as an adverb modifying "makes." Like I said, though, most subordinating conjunctions are adverbial--because, although, if, where, when, and so on.

So here's your sentence: "When I heard that it was done by the same two that did The Wire I figured that it would be worth it." The 1st "that" here is a substantive subordinating conjunction and "that . . . Wire" acts as if it were a single noun, the direct object of "heard." Inside of that clause, then, the 2nd "that" should really be "who" since the "two" is really "two guys," and for people (and for those of us who live them, animals) the "correct" relative pronoun is "who," not "that." But at any rate, that 2nd "that" is indeed a relative pronoun, and the clause "that . . .Wire" is a restrictive relative clause modifying "two." The 3rd "that" is of the same variety as the 1st one, a substantive subordinating conjunction, and the clause it introduces, "that . . . worth it," acts like a noun, the direct object of "figured."

Now, aren't you sorry you asked?

And here's a real response to carp. Grammar is not all that important if all you want to do is communicate in a broad and not very specific way. But grammar is the medium of nuance and specificity. So sure, even Twitterese communicates, and can be effective in conveying an idea. But what it can't communicate is a whole universe of signification. For that, you need good grammar, good diction, good syntax, good rhetoric. The same principle applies to buildings. I could live in a shack built pretty roughly and not very elegantly. I prefer not to.
MACTECH ubi dolor ibi digitus