Druids and rangers can use the animal friendship spell to gain animal companions. Use these rules of thumb when characters have animal companions.
While the spell allows a character to have animals whose Hit Dice total double the character's caster level, that maximum assumes optimal conditions. The typical adventurer should be able to maintain animal companions whose Hit Dice total half the maximum caster level. If the character spends most of her time in the animals' home territory and treats them well, she can approach and even achieve her maximum Hit Dice. If she spends most of her time at sea, in cities, or otherwise in places that the animals don't like, her animals desert, and she will not be able to retain even half her maximum. Remember, these creatures are loyal friends but not pets or servants. They won't remain loyal if being the character's friend becomes too onerous.
The animal is still an animal. It's not a magical beast, as a familiar or a paladin's mount is. While it may have learned some tricks, it's still no more intelligent than any other animal of its kind, and it retains all its bestial instincts. Unlike intelligent followers or cohorts, animals can't follow complex instructions, such as "Attack the gnoll with the wand." A character can give a simple verbal command, such as "Attack" or "Come," as a free action, provided such a command is among the tricks the animal has learned. A more complex instruction, such as telling an animal to attack and pointing out a specific target, is a standard action. Animals are ill-equipped to handle unusual situations, such as combats with invisible opponents, and they typically hesitate to attack weird and unnatural creatures, such as beholders and oozes.
Left to its own judgment, an animal follows a character and attacks creatures that attack her (or that attack the animal itself). To do more than that, it needs to learn tricks. An animal with an Intelligence of 2 can learn six tricks.
Possible tricks include: