Almost perfect obedience takes time and some effort.
Everybody dreams of the perfect dog who will listen and promptly respond to every pronounced command. However, dogs are living beings and not robots that will execute a given order with mechanical precision. If your commands seem to go in one ear and out the other, don't just assume Scruffy is being hard-headed and stubborn; rather, try to evaluate some possibilities so you can troubleshoot the issue and work on training more effectively.
If your commands fall on deaf ears, most likely your dog is not motivated enough. It's a romantic belief that dogs obey primarily to please their masters. In reality, when you are asking your dog a behavior, your dog is most likely thinking: "What’s in it for me right now?" Dogs tend to repeat behaviors that are rewarded, and in order for your dog to obey, you need to find what your dog finds rewarding in the first place.
If your dog is new to the concept of training, he may disobey simply because there are too many distractions around. You may find Scruffy more interested in sniffing a lamp post, looking around or greeting another dog across the road. Why is that? Most likely it's because your dog is overwhelmed by too many environmental stimuli and has trouble focusing. Start training your dog in a quiet room using high-value treats. This should create the perfect grounds for teaching him to attend more to you and build a foundation for training. Once the behavior is fluent, you can then gradually move on to more distracting environments.
In the dog-training world there is a saying: "Be a splitter not a lumper." This quote by reputable animal trainer Bob Bailey simply means it's best to split exercises in small steps rather than asking for a behavior in one evening. If your dog disobeys, there are chances you may be asking too much at once and the exercise may be too hard for him. So to help your dog succeed, try not to raise the bar too high; rather, make sure to break the final objective into several attainable steps.
If your dog is going on a strike and disobeys you, you need to evaluate if you have been too conservative in rewarding good behaviors. A low rate of reinforcement, which means rarely rewarding your dog, can take out your dog's enthusiasm in training just as the wrong oven temperature may cause a souffle to collapse. Make sure you provide your dog with a high rate of reinforcement, especially during the initial stages of learning. Reward your dog repeatedly so to confirm in his mind that he's doing something right and keep that enthusiasm alive.
If you are getting tired, frustrated and angry, your dog will most likely sense it and start shutting down rather than becoming more compliant. Raising your voice, looming over him in a threatening manner or getting in his face will cause your dog to feel compelled to send you appeasement signals rather than perform the command. A scared, worried dog cannot learn effectively, so if your training session is taking a turn for the worse, try cutting it short and ending on a positive note by asking your dog a behavior he already knows and rewarding it lavishly. You can then resume training at a better time.
Don't blame your dog for ignoring your commands; disobedience is not always your dog's fault. Pay attention to your commands: are you using the same ones consistently? You can't use the command "down" to tell your dog to lie down, get off the couch and stop jumping on you as these are three different behaviors for the same word. Make sure you stick to a command for each behavior and that your family uses the same consistently. Try enrolling in dog obedience classes; your trainer will outline some common mistakes you may be making. Last but not least, if your dog has always been for the most part obedient and lately is slacking off, consider the possibility of some health issue going on.
Association of Pet Dog Trainers: Why do Trainers Use Food When Training?