HALFWAY up the Scotsman Steps in Edinburgh, geologist and paleobiologist Doctor Alistair McGowan is on his belly with a magnifying glass in hand pointing out a fossil in the marble. Look closely, he says. You can see the outline of a cephalopod, he tells me.

And yes, there it is, fused into the stone, a tight spiral form that ascends like a staircase. An ammonoid. Some 380 million or 390 million years ago this was the shell for a marine mollusc of some sort that was feeding and breeding in the region of what is now the Anti-Atlas Mountains in Morocco.

Related to squids, cuttlefish and octopuses, this creature died, sank to the bottom and was buried in the sediment. Eventually the shell and surrounding loose sediment grains were cemented together to produce solid rock.

Millennia later it was quarried and transported halfway across the world to become part of the Scotsman Steps at the instigation of Turner Prize winning artist Martin Creed, for his 2010 art installation Work No. 1059.

McGowan, all hair and enthusiasm, is speculating on how this little creature ended up encased in marble millennia ago. “There are very many different pathways to becoming a fossil,” he explains.

He traces the outline of the ammonoid with his finger. “The inner part has been preserved in a whiteish mineral, which I’m guessing is Calcite, and the outer part has been preserved in sediment because that’s open like a bucket.”

As McGowan lies on the stone floor, people pass up and down the steps around us, oblivious.

Obliviousness is the default human position, isn’t it? We accept the world as it is and rarely think about the how. It’s typical human behaviour. “Most people don’t think about how Maxwell’s equations relate to their mobile phone or how the internal combustion engine works,” McGowan points out.

And yet our 21st-century lives are rooted in the distant past. The stones beneath our feet, the stones in the buildings that surround us, are the physical evidence of the planet’s millennia-long story. Deep time made manifest.

On every street you walk on there are stones – sedimentary, igneous or metamorphic – that are in a way a form of frozen time travel. Stones from local quarries, stones from Caithness and Yorkshire and Morocco and Bavaria, stones laid down in the Carboniferous era and repurposed for our own use over the last few centuries. The world around us is a Tardis.

Most of the time we’re too busy popping into Starbucks for a Soy Chai Latte or checking our mobile phones to notice. But the past is all around us, if we’d only open our eyes. Today, the Doctor (McGowan not Whittaker in this case) has offered to lend me his.

And there is so much to see in Edinburgh, this city built around and on top of an extinct volcano.

More than that, the volcanic plugs of Arthur’s Seat, the volcano’s main vent, and the Castle Rock, have done much to shape the look and the settlement patterns of the city. Edinburgh is an example of geology as design.

We are on a journey into the planet’s primordial past. It will take us from Morocco to Austria and from the Highlands to Argentina, all without leaving the old town. These are the stories of the stone of the city.

“These slabs here are from Caithness,” McGowan tells me, pointing at the paving stones beneath our feet as we walk down East Market Street towards The City of Edinburgh Council’s offices.

“They were the base of an ancient freshwater lake up around Orkney and down to round about the Moray Firth.”

The stone dates back some 380 million years ago to the Devonian era. At that time the environment in what is now the north of Scotland would have been arid.

“The analogy we use for the Devonian is Death Valley in California,” McGowan explains. For anyone who has spent a winter in Wick that might be hard to imagine, but there it is.

We move onto Waverley Court to look at the walls. Council workers come and go from the building. Some stand around outside having a fly cigarette, watching with vague interest as we start to feel up the sandstone façade on the building.

“We’ll just shuffle along a bit and you’ll start seeing some obvious fossils,” says Doctor McGowan. “That’s an ammonoid,” he says pointing to another ice cream cone on the side of the council offices. “The piece next to it is a two-dimensional section of a belemnite,” he adds. “Belemnites were around in the Jurassic and Cretaceous period, between 200 million and 66 million years ago.”

The sandstone the fossils are embedded in is smooth and creamy to the touch. As smooth and creamy as you’d want your life to be. “There’s a lot of touching in geology,” McGowan admits.

He runs his hands over the walls of the building. “This is known in the trade as Bavarian gold limestone,” he points out. “This is from the lagoonal environments in the Solnhofen in Eistadt, the lagoons where the archaeopteryx [a transitional fossil between dinosaurs and modern birds] comes from. No archaeopteryx here unfortunately, but very, very fossiliferous.”

Fossiliferous might be my new favourite word, I think, as he looks for more examples. We both caress the stone, tracing the shapes of ancient sponges and bivalves.

We cross over the road and walk up the hill towards the Royal Mile. On the rise there’s another building that has used Bavarian gold limestone as for its facia. The stone here is rougher textured, not so finished.

Still, it has stories to tell. We stand back and take in the patterns that can be seen flowing across the surface of the stone. These stones were once the bed of a river, my guide explains. And, indeed, as I look, I can see the flow of the water, great sweeping arcs of it, a liquid path now scoured in stone.

Over coffee in the City Art Centre Doctor McGowan charts his own course. It starts with feathers not rock.

“I was always interested in birds when I was wee. I was born in Paisley and I grew up in Aberdeen. Two of the big boys on my street were in the YOC, The Young Ornithologist’s Club, so I got into that.”

At university in Glasgow, McGowan says, he wanted to study astrophysics. “But my calculus remains a bit iffy.” Instead, he segued into geology. After uni, he worked for three years in a boatyard in Knoydart and spent time building mountain footpaths in Torridon and up Arthur’s Seat.

He then went to Bristol to do a masters in paleobiology and then decamped to Chicago for his PHD, before eventually returning to Scotland. He is 46 now. His partner is an atmospheric physicist. They have three children, a 12-year-old girl and eight-year-old twins.

In a bid to manage family commitments McGowan went freelance. And, so, he does upland bird surveys in the Highlands and Duke of Edinburgh expedition work.

And when asked he will show people the geology of Scotland that surrounds them, whether that be up mountains or in the city itself.

From birds to stones doesn’t seem an obvious step, I suggest. That turns out to be a very 21st-century notion. “If you go back to the 19th century, the heyday of the Victorian collecting mania, geology was very much part of natural history. Rocks, soils, fossils, minerals are the non-living part of natural history, what we call geodiversity. If you like, they set the stage for the biological actors – the plants and animals – to strut upon.”

What he does is big picture stuff, you could say. “Thinking about evolution, but on enormous scales, up to the point where you are shifting tectonic plates around and the signature that that will leave on the fossil records. And that feeds back to reconstructing what the environment was like.

“So, it’s doing natural history, but on a really, really, big scale. And that does go onto the elements of what we are made up of, because we are all children of stars. We’re formed in supernovas.”

He brings out a map of the rocks and stones of Edinburgh, points out the volcanic crag and trail and the surrounding coal fields. His maternal grandfather used to be a miner before becoming the last provost of Prestonpans. His family story is written in the rocks that surround us.

The city of Edinburgh is shaped by the geology of the landscape it is built upon. The layout owes much to the volcanic geology and the Nor’ Loch which once extended from the Castle Rock down to Market Street.

“The old town was incredibly tight and confined onto the crag and tail until pretty late on,” McGowan points out. “Edinburgh didn’t really break out of the old town because of a combination of the Nor’ Loch, the fact that it was an important military site, and also differences in the land ownership patterns.

“Glasgow is built on a series of ridges and valleys that are part of a drumlin field which are the result of the last ice age, whereas, here, you have one big feature that you’re working around. It’s a mixture of geology setting the stage of what you’re going to do and then what people want to do. We set up our ecosystem as we want it.”

In Glasgow that meant building on the slopes of the drumlins. In Edinburgh the relatively soft sedimentary rock on the downhill side of the castle meant people could tunnel into it. “You could dramatically expand your living space. It’s the 19th-century equivalent of people putting those sub-sub basements in in London.”

We walk on and eventually turn into St John’s Hill, climbing up past the NCP car park to a scrubby little garden full of plastic bottles, newspapers, empty Kronenberg beer cans and a small memorial to James Hutton, one of the founders of the science of geology who lived on this site until his death in 1797.

“This is how Hutton is memorialised in Edinburgh,” McGowan points out. It is, it must be said, a slightly shabby little memorial garden for such an important scientific figure.

But maybe the memorial is all around us. It's there up on Salisbury Crags where you can see what Hutton saw; a dolerite sill caused by magma forcing its way between layers of existing sandstone rock. Millennia later this rock formation shaped Hutton’s thinking and was then named after him: Hutton’s Section.

Edinburgh is a city that was made for the most part from local stone. On a map McGowan points out the various quarries. Hailes, Craigmillar Hawkhill, Craigleith.

But stone travels too. On Chambers Street, we stop at the statue of Greyfriars Bobby. McGowan rubs his fingers over the glossy, polished black grained stone at the base.

“I will make no comments on the tale, but this is Shap granite from Cumbria. It’s very distinctive because of these very large phenocrysts,” he says, pointing to the glittering crystals that pattern the black rock.

Like everything, there are fashions in stone. Igneous rocks from Norway are popular for shop faces, for example.

Glasgow, meanwhile, has more Portland stone than Edinburgh. But you can find one example on Hanover Street, now home to Lakeland and the Royal Society of Edinburgh

“That was originally owned by one of the insurance companies,” McGowan explains [the Edinburgh Life Assurance Company]. “By showing that you could bring that stone all the way from Portland you were basically saying, ‘We’ve got the capital to pay out on your claim.’”

And so, rocks, laid down millennia ago, are dug up and transported around the world. We shape the world that shapes us … those Caithness slabs in East Market Street can also be found around the Cutty Sark in London. Some, McGowan points out, have travelled as far as Buenos Aires.

We’re only going as far as the Grassmarket, where we pop into Stan Wood Dinosaurs to meet its manager Matt Dale. He has had the fossil shop for the last 12 of its 31 years. This morning, he tells me, he has just sent his empty crates down to Bristol where they will be shipped out to America in time for a trade show he is attending in Arizona. Trade shows are where he picks up the bulk of his stock.

Looking in one of the display cases McGowan points out “snakestones” from Whitby. “They used to be a tourist good luck charm,” Dale explains. “The story is that when Saint Hilda arrived at her abbey, she was disgusted to find snakes there, so she turned them into stone and cast them into the sea.

“When people found ammonoids they didn’t know what they were and assumed they were the snakes.”

“There are lots of stories that are people’s attempts to explain things in the natural world,” adds McGowan. “Dragon myths, which are pervasive all over the world, are probably a mixture of people seeing ice age dinosaur bones because how else could you possibly explain this flying winged beast?”

We tell ourselves stories about the stones that surround us. The stones tell their own stories.

For a moment I think again about that little ammonoid fused in marble on the Scotsman Steps. Caught in stone, caught in time. A small mark on the face of eternity. The story of life itself.

Doctor Al McGowan is an Edinburgh-based chartered geologist and qualified outdoor leader. He runs natural history-themed walking tours across Scotland. For more details, visit hillsofhame.com/