You've already learned three grammatical cases in German: Nominativ for the subject, Akkusativ for the direct object, and Dativ for the indirect object. Now you'll meet the fourth and final case, Genitiv, the case of possession and belonging. You use it when you want to say "the man's house" or "the door's color" — whenever one thing or person owns or belongs to another.
Many languages express possession simply by placing the possessor directly next to the thing owned, and that idea is close to what Genitiv does, but German places the definite article and the possessing noun after the thing owned, and adds a special ending to the noun itself. The basic rule: with masculine and neuter nouns in the singular, the article der or das changes to des, and the noun itself gets -s or -es added at the end, so der Mann becomes des Mannes. With feminine nouns and all plurals, der or die simply changes to der, with no change to the noun's ending at all.
One important point: this is the only grammatical case that changes the shape of the noun itself, not just the article — which is why it can feel intimidating at first, though the rule itself is fixed and has few exceptions.
In practice, you should know that everyday spoken German avoids Genitiv quite often and replaces it with a simpler construction: von plus dative. Instead of saying "das Auto des Mannes," you can simply say "das Auto von dem Mann," which is perfectly acceptable and very common in daily conversation, while true Genitiv remains more common in formal writing, journalism, and literary texts.
Another key use of Genitiv is a set of fixed prepositions that always require it, most importantly wegen (because of), trotz (despite), während (during), statt (instead of), and innerhalb/außerhalb (inside/outside). You should memorize these prepositions together with the case they force, just as you memorized the prepositions for Dativ and Akkusativ earlier.
The most common mistake is forgetting to add -s or -es to the end of a masculine or neuter noun, changing only the article and producing the incorrect "wegen des Regen" instead of the correct "wegen des Regens." Remember: in Genitiv, the article and the noun change together, not just one of them.