Without some type of predator control, farmers raising sheep and goats can expect to lose livestock. Flock guard dogs aren't pets -- they spend their lives with their herds, protecting them from harm.
Breeds trained to protect livestock aren't the same as those used to herd them. Border collies, for example, have no equal as sheep-herding dogs but aren't much in the predator-control department. The best-known flock guard dogs are white, making them hard to distinguish when amongst the herd. These include the Great Pyrenees, the corded-coat Komondor, the Italian Maremma, the Akbash and the Kuvasz.
Whatever breed you choose, training starts in puppyhood. From the age of about 4 months, a flock guard dog will live with his charges. Rather than becoming part of the human family, as pet dogs do, the flock guard dog becomes part of the herd. Some training is involved, but a puppy either has this instinct to protect livestock or he doesn't. Some puppies, although they come from generations of livestock guarding dogs, just don't have that protective inclination.
Lambing time serves as an appropriate period for introducing a potential flock dog to sheep and gauging his reactions. You'll allow the puppy to spend time with lambs, perhaps penning him with older lambs in a barn or pasture. Eventually, introduce him to ewes by the same method. When lambs or ewes come by to investigate the pup, he should display submissive behavior, such as rolling on his back. You must immediately correct any mildly aggressive behavior toward sheep, such as ear nipping, with a sharp reprimand. A dog showing true aggressive behavior toward a flock isn't suitable as a guardian.
As a dog matures and bonds with his flock, he must learn to patrol the perimeter of the sheep's pasture or fence line. You can start this training by putting him on a leash and walking him around the area. Regular patrolling becomes part of his routine. Good guard dogs bark at any strange or unusual activity. Encourage that in your flock dog. Although flock dogs are generally suspicious of strangers, they aren't usually aggressive toward people or predators. Their size and loud barking discourage predators, meaning they don't have to actually attack intruders.
The flock guard dog puppy doesn't live in your house or have contact with any of your pet dogs. If you use herding dogs, that might present a problem. The flock guardian could view that border collie as a predator. You might have to temporarily remove the flock guardian when herding livestock.