3 answers
I've dealt with old stone walls settling and shifting over time, and the gaps usually need repointing with mortar - clean out the loose stuff first, then pack in fresh mortar (lime-based if it's an old wall, since it's more flexible than concrete) and smooth it flush. If the gaps are really wide or the wall's leaning, you might have a bigger structural issue and should get someone to look at it before it gets worse.
The mortar approach makes sense, but one thing that often gets missed is checking whether water's actually pooling behind the wall - that hydrostatic pressure can keep forcing new gaps open even after you've patched them. Before you repoint, make sure water can drain properly at the base, either through the wall itself or along a drainage path behind it. If the wall's on a slope or collects runoff, that moisture issue will sabotage any repair work you do.
Good catch on the drainage thing - before you even touch the mortar, dig down along the back of the wall and see if water's pooling or if soil's packed against it, because yeah, that pressure will keep busting through any repair you make until you fix it.
Your answer
Log into answer.