Another great question – I really don’t know but think that it is probably ‘instinct’, meaning that it is hard-wired into the brain.
Some species of butterfly have migratory behaviour and they (I presume) are even simpler at the brain level that birds. I wonder how much capacity a butterfly has to learn things – I suspect very little, so this is another piece of circumstantial evidence (aka guesswork) that suggests to me the ability to navigate is in-built, not learned.
Yes. There may be other factors too, but there seems to be a genetic component (from a quick search of the literature – I didn’t know much about bird migration before). If you breed migratory birds with non-migratory species, the offspring can inherit the migratory instinct (including direction)