The traditional method is to put galvanized wire fencing along the ground or inside a filled in trench. The fencing should extend at least two feet back or down in order to prevent the dog from digging underneath.
I find stapling the barrier material to a bit of wooden furring strip, and then screwing that to the wooden fence makes for a strong and reasonably attractive edge without offering up a spot for the dogs to grab.
Instead of galvanized chicken wire or fox wire, which will eventually rust due to contact with the ground, I am putting in welded plastic Yardgard hardware cloth which I picked up at Southern States and which was pretty low cost. With luck, this stuff should last forevever (or at least as long as I will).
I don't think this plastic fencing is tough enough to keep out a very big dog, but it's bonded at 1/2 inch centers, and it should be difficult for a small terrier to dig through it when it is rolled out flat, lawn-stapled to the ground, and covered with dirt, mulch, gravel and plants. For now I am putting it in a small section of the yard and leaving it exposed to see how the dogs react to it. So far, they are not digging where it is matted!