The Scottish Terrier, like most similar breeds, can pose some interesting challenges when it comes to training. This is because dogs of this type were usually bred for work, and often that work needed to be carried out away from human supervision. The result is that those tendencies still tend to be ingrained in the Scottish Terrier today, but what would be useful characteristics in a working dog are troublesome in a pet or show dog. In particular, the Scottish Terrier is known for having a very assertive (but not "aggressive") attitude that tends to make them think they're the boss of any given situation. This jaunty attitude is actually part of the Scottie's unique charm, so we don't exactly want to break them from that, but it does mean that certain steps will have to be taken in order to get through to them.
As with most terriers, the most important thing to keep in mind when training your Scottie is consistency. Scotties have a lot of natural inclination to perform behavior that might be considered undesirable such as barking at strange animals or people, chasing small animals (or anything really, so long as it gives chase), and especially digging. In order to circumvent these behaviors, you'll have to be especially vigilant and scold your Scottish Terrier every single time they misbehave. By letting them slip by even once, you'll break the chain of consistency that's so critical to training a Scottie, and they'll begin to think that the undesirable behavior is "sometimes" okay, rather than totally off-limits. For this reason, it's important that you don't attempt to train your Scottie when you only have a limited amount of time to devote to discipline. If you're only going to be inconsistent in your approach, it's much better to wait for a time when you'll be able to devote full attention to breaking the unwanted habits.
Training a Scottish Terrier, or any dog for that matter, is of course not all about breaking bad habits though. In fact, positive reinforcement of good behavior tends to be a much more suitable approach to training any breed, particularly stubborn ones like the Scottie. The key to this is to identify something that your dog in particular considers to be rewarding. Whether this is a certain type of treat or a favorite toy, you'll just have to find out through experimentation. Once you know what will motivate your Scottie to perform, you can begin teaching him or her certain basic commands that will prove useful in managing his or her behavior. A great example of this, and probably one of the most important you can teach your Scottie, is to come when called. This is because of the Scottie's tendency to give chase or break free from enclosures by digging. If your Scottie is trained to respond to your calls, it could mean the difference between life and death.
Training any terrier can be an almost overwhelming task, and the particularly willful Scottie is no exception. With a little common sense and perseverance, however, it can be done and the rewards are well worth it.