This has been proved by letting birds fly in a planetarium and changing the stars' position. Another tool is the earth's magnetic field (earth's north and south magnetic poles). Some birds, like pigeons, have a small zone in their brain made of magnetite (magnetic mineral), just like a small compass.