Your dog is always learning. The problem is - how do you get your dog to learn good habits and NOT bad habits? Dogs understand things very differently than us humans, so frequently when you are training your dog (or even when you think you are NOT) you are actually making behavior problems worse!
Swatting or hitting your dog is not a good training method. If you attempt to train your dog in this manner, all you are teaching them is to be scared of you. Eventually, the dog will stop listening to voice commands, and will only respond to you raising your hand. Getting a dog's loyalty through fear is a mistake on the owner's part.
To train a dog to stop barking you must first train him to bark on command. When the dog barks on command instead of when he chooses to bark, it is easier to teach him to stop barking during the training session. Once he learns the command for "stop barking" he will follow it outside of training.
A dog's name should only be used when positively interacting with the animal. Call the dog's name to get him to come to your side or call his name when you are serving his dinner. Don't, however, call your dog's name when you are unhappy with his or her actions. The dog would negatively associate that with punishment.
When trying to train your dog, always reinforce positive behaviors even when you're not actively in a training session. It's easy to remember to reward your dog during a training session, but it's just as important to reward your dog for those trained behaviors the rest of the time, too. This builds a good connection for the dog between the behavior and the reward.
When choosing a new dog for your household, it is a good idea to do some research on different breeds of dogs. This will help you find some that are suited for you and your lifestyle so the dog can be a part of your family for many years to come.
Make sure you are feeding your dog high-quality food. Behavior problems are often caused by a poor diet. High-quality dog food has human-grade ingredients and an expiration date. Making sure your dog eats plenty of protein and avoid giving him "junk" food from the table. A well-fed dog is a happy, obedient dog.
Over-training your puppy will expose it to too much at once, rendering the training less effective. Brief, simple, positive training sessions are well-suited to the limited supply of energy and attention a pup has to work with. If you try to teach too much, he won't like the training sessions and won't remember everything. This will only frustrate you over time.
Try these simple techniques yourself in your next training session with your dog. Try as few or as many of the tips as you want. Once you have practiced and then mastered these strategies with your dog, he will become the well behaved member of society you dreamed he would be.