There are different things that may cause animal migration. There are some who know that they have to move because there is no food source that is available in the area. There are also some who would need to travel to a faraway place because of the season. They know that they will not have the ability to survive the weather.
They migrate in order to find more livable conditions. Another reason that animals have for moving is in order to breed. This explains why there are some breeds that are available in different areas. Animals that migrate usually do not do it on their own. They usually travel in packs.
Animals know when to migrate because they have internal clues that let them know it's time. They can sense something called photoperiod, which is the amount of daylight there is left in the day. When the days get shorter, that is a hint for the animals to migrate. Some birds, fish, and whales travel great distances when migrating to find food or to mate. Some animals travel as far as 10,000KM.
Migration is a behavrioal adapttion that has evolved over time to help animals survive. Some birds learn the migraton routes from their parents. If the birds are raised in captivity humans have to teach them using a plane.