It’s an innate sense which most closely resembles proprioception (knowing where you arms/legs/etc are), or remembering where you put your keys. I suppose maybe it’s similar to “seeing” landmarks on a map (not necessarily a grid) but it’s simultaneously abstract while being very well defined in some intuitive sense: I know the Vatican is this way and the Colosseum is that way and the Spanish Steps are that way (and every other spot I cared to notice on the map), and no matter where in the city I walk and so long as I know which way I’m facing, I’ll 100% know the relative direction and distance of every other spot (as well as the pathing! Not just locations but also streets, etc). It’s actually hard for me to get lost.
You can see references to this geospatial sense in ancient Roman times: https://en.wikipedia.org/wiki/Method_of_loci