A pity you can’t ask a dog for the shortest route home when you’re lost—or a cat or a seabird or a tortoise or a dung beetle, for that matter. Because if you could ask any of them how to get pretty much anywhere, odds are they’d know a lot more than you think.

Animal navigation has long been something of a black box for scientists. The mystery of how nonhumans—without benefit of maps, language or GPS—manage to find their way from place to place, often over very great distances, presented itself anew recently when a dog walked 11 miles from its new home to return to a former foster owner. The feat was especially remarkable because the dog had been taken to its new location by car and had to find its way back on foot—meaning it hadn’t had a chance to learn the route. Even more impressive was the 2013 tale of the geolocating cat that had been lost and found its way home after a journey of two months and 200 miles. So how do animals manage such prodigious—and precise—feats of travel?

The kind of natural map any animal follows depends largely on the species. As TIME has reported, seabirds are believed to steer mostly by the sun and the stars, since if the animals are ever going to get lost, it tends to happen when the skies are overcast. The same is true of the unglamorous dung beetle. While naturalists have not extensively tracked the species’ perambulations in the wild, they’ve studied them in—yes—planetariums. As long as the artificial Milky Way was in view, the beetle and its dung ball rolled right along. Throw the switch and change the stars, however, and the little critter was completely flummoxed.

Many more animals navigate via magnetism—orienting themselves along the north-south lines of Earth’s magnetic fields. In one study of baby sea sea turtles, which typically migrate east after hatching, changing the orientation of magnetic generators around a swimming pool changed the direction in which the hatchlings swam too. Pigeons were thought to navigate the same way, especially since they have cells in their beaks that are heavy in iron. Later studies, however, found that those cells were related to the immune system, not navigation.

Mammals—and particularly two of the species of mammals that humans love best: dogs and cats—have a range of ways to get around. Dogs, no surprise, are very big on scent, and that can take them a very long way.

“An eleven-mile distance is actually not terribly long for a dog,” says Bonnie Beaver, the executive director of the American College of Veterinary Behaviorists and a professor at Texas A&M University. “If the dog had walked both from and back to his home he’d be following his own scent trail.” In this case, the dog was instead probably following an equally compelling smell: that of its owner, a type of navigation that is entirely possible over long distances as long as the wind is right.

Dogs extend their scent range by moving among overlapping circles of familiar scents—much the way cell phone coverage relies on interconnected footprints from different cell towers. A dog that wanders out of its own immediate range might pick up the scent of, say, a familiar dog in the next circle. That might point it to a circle that contains a familiar person or tree or restaurant trash can, and so on.

Cats, like other animals, might rely more on magnetic fields—a faculty that could turn out to be quite common in mammals. “There are some studies that show that the ears of most mammals contain iron,” Beaver says. “That may cue them into the magnetic direction in the ground. There’s work showing that cattle, deer and voles tend to orient in a north-south direction.”

The overall temperament of an animal—or, more broadly, of the species—can play a role in navigation too. A dog that travels a great distance to get home is likely trying to return to its owner, since the dog-human bond is a powerful one. A cat that travels the same distance is—sorry cat owners—probably just tying to return to its territory.

No matter how well animals navigate, scientists caution against an observation bias that may make them seem better than they are. A dog or cat that finds its way halfway across the state makes news; the uncounted others that stay lost do not. What’s more, some cases of remarkable returns may turn out to be matters of mistaken identity, unless there’s a positive way to identify an animal like an implanted microchip that some owners use along with a collar.

“You hear these stories about a three-legged black cat that came home and jumped into its favorite chair,” says Beaver. “But it’s real hard to be sure because they’ve been gone a long time and they look scruffy. And heck, that chair would be a comfortable one for any cat.”

Still, we shouldn’t dismiss all the stories out of hand. That cat that traveled 200 miles in 2013? It did have an implanted microchip. So kudos to at least one kitty—and probably a whole lot more.

Get our Space Newsletter. Sign up to receive the week's news in space. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Write to Jeffrey Kluger at jeffrey.kluger@time.com.