Animals are always learning. They are either learning from the consequences of their behaviors or they're learning by way of association. I think we all understand consequences to behaviors. If you comb the beach for buried treasure and find some, you're likely to keep looking for more. This is because you like the consequence of looking for treasure. The consequence of finding the buried treasure is actually going to help build an association too. You're very likely now to love beaches. Imagine if this was your very first time at a beach?
Associations happen when something predicts something. If a beach predicts buried treasure, you're going to like beaches. If a dog hears a bell prior to receiving food, the dog is going to like the sound of a bell. Associations are always being built. The strongest association that happens for dog or human is the very first impression of something new. If a dog walks into our training center and is given lots of tasty treats, that dog is going to see that the training center predicts tasty treats and is going to build a positive association especially because of that first impression. If a dog is walking down the street and a bus goes by making a very loud startling noise, the dog is going to be afraid of buses because they predict loud noises which are scary.
It's extremely important to set our dogs up to see that new stimuli (people, places, noises, surfaces etc.) predict awesome stuff. This is especially important because that first experience is so salient. It's what is remembered most. Having a behaviorally sound adult dog is continent upon those first impressions.
To set yourself and your dog up to succeed it's very wise to have tasty treats on you in a treat bag. The goal is to give your dog lots of great stuff a few seconds after it is experiencing something new. Scary bus goes by and your dog alerts to it, give him lots of good stuff. This will show him that buses going by predict awesome stuff. Once again, this is extremely important the very first time your dog experiences that thing.
Another way to set your dog up for success is to make sure that you aren't using a training device that causes any pain or discomfort. Choke chains, prong collars and shock collars all work via pain or discomfort. This is the easiest way to teach your dog that things in its environment predict things that the dog doesn't like. If you're currently using a device that works via pain or discomfort, take a look at this for alternate devices that will give you control and won't have any side effects.
Remember, first impressions matter to us and they matter to your dog. Take advantage of them. If you have a young dog, you're going to come across a lot of "firsts." Have your treats ready and build some positive associations.