On a warm, wet day not so very long ago I took a walk around St Cuthbert's Cemetery in Edinburgh.

Down the steps from Lothian Road and along the path that arrowed between the cracked and crumbling memorials to people who once were and are no longer. Rain came down in brief, guddling sweeps but otherwise the day was quiet; quieter the further I moved away from the white noise of traffic. Soon, only birdsong, the susurrus of trees and the subterranean pulse of trains pulling in and out of Waverley broke the silence. Standing there, I realised, the melancholy stillness of the place reminded me of something.

Once upon a time - a time somewhere in the late 1980s - on holiday in Italy I remember visiting cemeteries as well as St Peter's and the Pantheon: one in Anzio, where little military white crosses were laid out in serried ranks, dragonflies dancing and darting between them, and the other in Rome, Il Cimitero Acattolico Per Gli Stranieri, commonly known as the Protestant cemetery, where Jews and Muslims and Buddhists and atheists as well as Protestants were laid to rest. Within its grounds is the grave of the Italian Communist thinker Antoni Gramsci, though it was the headstones of the English poets Shelley and Keats that drew a modest crowd. Keats died in a house above the Spanish Steps and was buried unnamed: "Here lies one whose name was writ on water." Around our feet tiny lizards skittered between gravestones while feral cats hunted them or sat grooming their mangy fur. In this place of death a hushed, dialled-down life carried on.

All these years later it's the cemeteries I remember most from that holiday, not the red of the land, the nuns that stayed in the next chalet, the dinner with Catholic priests whose English was as poor as our Italian, not even Michelangelo's Ascent Of Man. It was the hushed peace of stone; the same hushed peace to be had here in St Cuthbert's.

Worship started in this corner of Edinburgh in the 13th century. The church steeple dates from 1789 and the rest of the church from 1894. In its grounds lie John Napier, the inventor of algorithms, and, after a life of opium eating, Thomas De Quincy. They lie alongside ministers and stablers and writers to the signet and ropemakers and representatives of other professions that have long since mouldered in the public imagination like the Latin phrases that grace so many headstones.

Here too are memorials to soldiers who fought and died for their country in wars we've long since forgotten, among them Captain James Sholto Douglass, of the 4th Madras Light Cavalry, who died at Buxar in Eastern India in 1858 "of wounds after leading a charge against rebels at Kheree". Not so far away there's even a memorial to a Confederate officer, William Alexander, "1st Lieut 59th Virginia Regt. CSA", who died in Virginia on January 25, 1865, "aged 30 years".

All these lives immortalised in cold stone and gathered among the skull-and-bone filigreed work of long-dead stonemasons. Cherubs' heads covered in moss stare down sightlessly at the detritus of the current century: plastic cups, a Lucozade bottle, a Tennent's Super Lager can, used needles, yellowed papers with headlines informing readers - of whom there are few here - "How to have the best sex ever". In life we are surrounded by death. And vice versa.

When I was younger, maybe that idea was what attracted me to such places. And then people I knew, people I loved, started to die, and the appeal of cemeteries kind of died for me.

But I came to St Cuthbert's to try to work something out; to ask how we once commemorated our dead and to wonder how that has changed. What are cemeteries for? For burials, of course. But beyond that? What is their purpose when there are no more funerals, when the cemetery slips from use into history? What attention do we pay to these grand cities of the dead that now surround us? Their dead weight anchors our towns and cities - think of the Victorian grandiosity of the Necropolis in Glasgow, the storied richness of Greyfriars in Edinburgh, where you can still see a mortsafe - an iron cage placed over the grave as protection against body-snatchers.

But they feel distant from us in a way now, in their grandness, their religiosity. As it happens, I am going to a funeral next week. A cremation. The first cremation in Scotland - in Glasgow - took place on April 13, 1895. In the UK now, three-quarters of funerals end in a cremation and there is a growing interest in something called direct cremation, in which funeral directors take care of the body without a service. Any service the family require takes place without the deceased.

In his book How To Read A Graveyard, the author Peter Stanford reports a survey carried out by the Co-operative Funeral Society that showed that after 15 years most graves are not maintained. The sharp pain of grief dulls in time (though, of course, it never goes away, or not until we do).

And cemeteries themselves inevitably change their position in the culture when the people who grieve are long gone themselves. They become places of history rather than places of grieving. They tell us how we once lived and how we once memorialised our dead.

"In a very positive sense they tell us about our history," Stanford believes. "If you wander around Greyfriars, it tells you about religious history, about cultural history. Skull and crossbones used to be the way we looked at death. Nobody would put a skull and crossbones now. They'd think it rather unkind. So they tell you all sorts of things. They tell you about ourselves, the history of religion, the history of broader national conflicts. But I think they also tell you something about our relationship with death."

Today, he believes, you might characterise our feelings towards the subject as squeamishness. We'd rather ignore it, pretend it's not lurking in the corner waiting for us. The Victorians embraced it and built grand mausoleums. Walk around a municipal cemetery and it's the modesty you notice. That and the mementos of the ordinariness of our secular lives. I've seen images of dogs and horses and, I'm sure I'm not misremembering, a dartboard on headstones.

In part, Sanford believes, this is all a reaction to - and a rejection of - the Victorian obsession with death. That and a withering away of religious belief. More than that, he suggests, "We've sort of bought into this idea now that death has become a kind of failure. If people have cancer now they're not treated for cancer, they battle it. And of course if you're battling with anything it also suggests that somehow death can be avoided.

"I just think we have this culture now that is all about not addressing it, not talking about it, regarding it somehow as a defeat."

"When you're dead, they really fix you up. I hope to hell when I do die somebody has sense enough to just dump me in the river or something. Anything except sticking me in a goddam cemetery. People coming and putting a bunch of flowers on your stomach on Sunday, and all that crap. Who wants flowers when you're dead? Nobody."

- Holden Caulfield, The Catcher In The Rye

In a wood near North Berwick I meet Ben and Sarah Gray. Ben's an arable farmer. Binning Wood is on his land and four years ago he and his wife decided to open it up as a natural burial site. "The initial thought was a pet cemetery," says Sarah," but looking into it proved that the waste management licence requirement for burying pets was much more stringent than humans."

That's down to the size of some animals, Ben says. So instead they opted to give the space over to people. Around us the trunks of beech trees stand like elephant legs and in the ground among them are small plaques to those who are buried here.

"The good thing about the beech is you get the lovely golden leaves which makes life easier," says Ben. "And the root systems are a lot more forgiving - they go straight down."

"They're stronger as well," Sarah adds. "They stand up to the winds we get . It has to be higher ground, no ground water."

The wood is open to walkers and wildlife (deer, you'll be pleased to know, don't dig). And it's that sense of life that appeals to those who choose to rest here. "It's something that appealed to us having been to family funerals at crematoriums," says Sarah. "That conveyor-belt thing - one in, one out. And you are very much on a timescale. A wedding can take all day. Why can't a funeral?"

There have been more bodily interments than burials of ashes (maybe as much as 70-30 in favour of the former). Electronic tags and numbered trees let them keep track of where committals have taken place.

Who chooses a wood for their final resting place? Sarah had expected it to appeal to those with hippy roots, but that's not been the case. People of all faiths, all professions, have chosen to rest here. "There's no particular type. I've been struck by that."

What they do have in common, suggests Ben, is a love of nature and the outdoors. "We've had everything," says Sarah. "We've had bagpipers. We've had people playing guitars, people singing, lighting candles, people bringing their dogs to the funeral. We've had horses that pulled the coffin on a cart. We've had DIY funerals …"

DIY funerals? "No funeral directors. The family do everything. They collect the deceased, they organise the coffin and bring it in the back of the family car. One woman, whose daughter had died of cancer, put it very nicely to me. She said, 'I brought her into this world and I'm taking her out,' and that made sense to me."

What have they learned about themselves since starting this? "I'm much stronger than I thought I was," Sarah says. "I didn't think I'd be able to deal with death, but it's an inevitability."

It is. Death is our destination. Money or status or power won't alter that. And all that leaves is memory and once that goes, possibly renown. Possibly. On researching How To Read A Graveyard, Peter Stanford visited Pere Lachaise in Paris, the final resting place of Oscar Wilde, Jim Morrison, Colette, Moliere and Chopin. "The important thing about Pere Lachaise is it broke the stranglehold of the church," he says. "But what people know it for now is as a celebrity graveyard. People wander around and go to all these celebrity graves. But do you know which is the biggest monument in Pere Lachaise? He's called Baron Louis Felix de Beaujour and has this enormous … well, let's call it a chimney to be generous. It looks very much like something else. And it says at the bottom: 'The leading architect of his day.' And afterwards I got back and I did what we all do. I looked him up on Wikipedia and he isn't on it. There's no record of him.

"And then you go to the Protestant cemetery in Rome and there is Keats' grave without his name on it. He didn't want his name. And there are always people around it. Worth will out, in that sense. You can build yourself the biggest memorial in the world and nobody will remember you."

The baron, it should be noted, now has a Wikipedia page. Maybe that's the future for us. We will live and die and then exist for a while as digital ghosts. I reckon Captain James Sholto Douglass got the better deal. n

For information on the Binning Memorial Wood visit binningwood.co.uk.