When you want to describe a person or thing with a full clause instead of a single adjective, you reach for a word like "who" or "that": The man who is standing there is my father. German has a very similar tool called the Relativsatz (relative clause), but it is a bit more precise, because its relative pronoun is determined not only by the gender and number of the noun it describes, but also by its grammatical role inside the relative clause itself.
Why do we need this structure? Because natural communication at this level requires combining information into longer, smoother sentences instead of chopping speech into short, separate pieces. Instead of saying "I know a woman. The woman lives in Berlin," you merge them into one elegant sentence: Die Frau, die ich kenne, kommt aus Berlin.
The mechanism rests on two separate principles that must be kept apart. First, the gender and number of the relative pronoun (der/die/das, or plural die) are taken from the noun it describes in the main clause — ordinary agreement, matching the noun in gender and number. Second, and this is the part that surprises most learners: the case of the relative pronoun (Nominativ, Akkusativ, Dativ, Genitiv) has nothing to do with the noun's role in the main clause. It is determined exclusively by its role inside the relative clause itself — is it the subject there? A direct object? Does it follow a preposition? Fortunately most relative pronouns match the familiar definite articles, with two exceptions worth memorizing: the Dativ plural is denen, not den, and the Genitiv is dessen for masculine/neuter and deren for feminine/plural.
Another strict rule with no exceptions: the conjugated verb always moves to the very end of the relative clause, exactly as in any subordinate clause introduced by weil or dass.
The key idea to hold onto is that this pronoun carries two pieces of information at once — gender/number on one hand, case on the other — rather than staying a fixed, invariant connector. The most common mistake is choosing the pronoun's case based on the noun's role in the main clause instead of the relative clause. Learners write Der Mann, der ich kenne instead of the correct Der Mann, den ich kenne, because der is the subject of the main clause — but inside the relative clause it is the direct object (I know him), so it must be Akkusativ: den.