The most important reasons why animals have tails is to help them balance and steer. Some animals use their tails for grasping and grooming, while others use them for display. It is not clear why tails evolved, but once they developed, animals have adapted to use them in many different ways.
Domestic animals use their tails to communicate and to show emotion. Dogs wag their tails when they are happy, and cats whip their tails back and forth when they are angry. A cat's tail also helps the cat keep its equilibrium when walking on narrow edges.
Wild animals use their tails to keep insects away, to communicate with each other or to warn when they are ready to attack. Large wild cats, such as leopards and tigers, use their tails for propulsion and speed. A monkey uses its tail as an extra limb to hang from branches and to move from tree to tree. Squirrels use their tails to keep their bodies warm and to help them balance on tree branches. Birds and bats have tails to help them fly and change direction in flight. Animals that live in water use their tails to help them move around in any direction and to swim very fast.