When you want to add descriptive information about a noun you've already mentioned, without starting a whole new separate sentence, you use words like "who" or "that/which." In German this job is done by a relative clause (Relativsatz), which always begins with a relative pronoun (Relativpronomen) that looks just like the definite article you already know: der, die, das, die for the plural.
Choosing the right relative pronoun depends on two things you need to check every time: first, the gender and number of the noun you're describing (masculine, feminine, neuter, or plural) — this sets the basic pronoun family, just like a definite article does. Second, the pronoun's grammatical role inside its own relative clause: is it the subject performing the action (Nominativ), or the direct object the action is done to (Akkusativ)?
In the Nominativ case, the relative pronoun is the one doing the action within its own clause: Das ist der Mann, der hier arbeitet. The man is the one working — he's the subject — so we use der, exactly like a normal definite article.
In the Akkusativ case, the relative pronoun is the one the action is done to — the object: Das ist der Mann, den ich kenne. I am the one who knows; the man is the one being known, so der changes to den, exactly the same shift that happens with the definite article in any ordinary accusative sentence you learned in A1: ich sehe den Mann.
The good news is that this change only happens with masculine singular: der becomes den. Die (feminine), das (neuter), and die (plural) stay exactly the same whether they're the subject or the object — nothing to worry about there.
Two more rules to keep in mind: the verb in a relative clause always moves to the end, just like in weil and dass clauses, and the relative clause is always separated from the main clause by a comma.
The most common mistake is trying to use the same relative pronoun (usually der) regardless of its role in the sentence, since many languages use a single, largely invariant word for "who/that/which" without this kind of case-based change. Always ask: who performed the action inside the relative clause? If it's the noun itself, that's Nominativ. If the noun had the action done to it by someone else, that's Akkusativ, and only in the masculine will the form shift from der to den.