The grammatical gender of a noun never changes for its article or pronoun.
Like in English, there are specific nouns for female and male specimen of species. You would use these and the pronouns in agreement with their grammatical gender. For example, die Katze (feminine) is a generic noun for 'cat' in general as well as for the female cat (sometimes you also hear 'die Kätzin' for the female), but in a context where you speak specifically of a male cat, it's 'der Kater'. Dog: der Hund (generally, and male), der Rüde (male dog, also for male wolves and foxes), die Hündin (female dog). Cow: die Kuh (in general, female cow, also used for female sea lions and other species), der Bulle (adult male, used for several species as well as a pejorative for 'policeman'). Pig: das Schwein (general), die Sau (female), der Eber (male). Horse: das Pferd (general), die Stute (female), der Hengst (male). Chicken: das Huhn (female), der Hahn (male)
For some species, gender-specific nouns don't exist or are lesser known. To still distinguish between male and female specimen, you use the words das Männchen (the male) or das Weibchen (the female), or make compound nouns with -männchen/-weibchen (species name often in plural, grammatical gender = neuter for both sexes): das Schildkrötenweibchen, das Schildkrötenmännchen. (This is of course not suitable on humans, except to achieve a satirical effect.)
Das Spinnenweibchen ist größer. Es frisst das kleinere Männchen unmittelbar nach der Begattung.