The anaphors that you would use are as follows:
The cow is a useful animal; pronoun ... it (normally)
The doctor works in a hospital; pronoun ... he or she (this one
is dependent)
The lion is the king of the forest; pronoun... it (normally)
As Andrew points out in his comment, in English, we normally use the pronoun "it" to describe an animal unless the animal be special like a pet. There are times wherein we do use "he" or "she" for animals that are not pets, but there is some type of intimacy or personalness involved when this occurs:
This one lion at the zoo is very aggressive when he is around
people.
As for a doctor, if we know the sex of the doctor, we use the specific pronoun that corresponds with the sex that the doctor is, so if the doctor is male, we use "he"; if the doctor is female, we use "she". If we do not know the sex of the doctor, traditional English grammar says that we are to use the masculine pronoun as the neuter form, i.e., "he" and its declension; however, many native speakers find this to be sexist for some reason even though many other languages such as French use the masculine form as the neuter when there's no specific neuter form:
Elles sont à la bibliothèque. They are at the library. (a group of females)
Ils sont à la bibliothèque. They are at the library. (a group of males or a group containing males and females)
Because many native speakers find the neuter "he" to be sexist in Modern English, the singular "they" has become popular as Livrecache points out even though it is still considered grammatically incorrect under the prescripts of standard English. Since this is still considered grammatically incorrect, another way native speakers say it in order to avoid using the singular "they" in the neuter is with a construction using "he or she":
Every doctor knows what he is doing. (neuter using "he")
Every doctor knows what he or she is doing. (neuter using "he or she")
The standard rule is a bit strange because it takes the feminine pronoun in the neuter when the referent can only be a woman such as a "mother", "woman", "witch", "waitress", etc. or its referent is a job or career that would be odd for a man to do:
Every hairdresser must receive a fifteen-minute break for every
four hours that she works. (neuter using "she" since the career of
a hairdresser is usually performed by women)
Every witch has a particular spell that she likes. ( neuter
using "she" since a witch can only be a woman; a man would be called a
"warlock" or a "sorcerer")
Many people, especially feminists, don't follow this rule and use the pronoun "she" and its declension as the neuter:
Everyone remembers where she was when Kennedy was shot.
This, however, is not considered to be correct under the prescripts of standard English, so I would avoid such a construction if I were you.