For example, if you were describing a female dog would you use il or elle? Where I live people describe female dogs using "il" and I'm not sure if that's because they don't care about the dogs gender or because "dog" in French is a masculine noun, and so even a female dog would be referred to as "il".
Il/elle or the article le/la refer to the noun gender, that is le chien may refer to a female dog, as long as we do not need to be specific about its gender. If we do want to be specific, we use an appropriate feminine noun - la chienne.
For some species the names of species, male and female might be completely different, like le mouton is le belier when talking about an adult male, et la brebis for an adult female et l'agneau when referring to a young animal.