Daily socialization changing environments is the single most important thing that you can do for your dog to ensure he is a buddy for life and you can take him everywhere. Your dog is affected by a wide variety of stimuli in the environment. These include but are not limited by sounds, smells, other animals, and humans. The social foundation your dog develops between 3 and 16 weeks, so the breeder plays a very important role in developing your dogs social foundation.
Pups exposed at a young age, on a daily basis, to a wide variety of new situations, sounds, smells, places, children, adults, friendly dogs and other pups will develop a much calmer and confident personality and is much more likely to become a dog that you can take anywhere at anytime. We start scent exposure from birth and sound exposure shortly after.
How should you properly socialize your puppy?
While exposing your dog to different stimuli don't force him into a situation he's shy about; let him deal with the situation as he see's fit. Certain situations will take more then one exposure for him to get comfortable. The gradual introduction of stimuli is also important. If your dog has never heard a loud bang before, don't fire a gun off near him. Instead expose him to softer bangs first and work him up.
Even before his vaccines, invite friends and relatives, young children of all ages, to your house often. Keep in mind that the long term goal is to make your dog indifferent to strangers and all other people. Don't let strangers approach you dog, let your dog approach the strangers.
Good breeders will have already started this process before you even meet your dog (do not buy from a breeder who does not understand the importance of this).
Stand in front of a mall entrance and let passers-by say hello but don't allow petting. Go to schools, shopping centers, nursing homes, and (after vaccinations) take walks with him in different neighborhoods. From time to time give praise to your dog for being indifferent to people walking by.
A pup needs to be socialized to people of all ages. Just because your pup is fine around 2 year olds does not mean he will be fine around 6 year olds. Your pup even needs to be exposed to baby. Never leave a baby or toddler alone with a puppy or dog of any age, extemely close supervision is required holding the baby at all times but let the pup sniff the baby if he wishes. Slightly older children (under 10) often tend to get rough and hurt pups (poking eyes, pulling tails, jumping on, slapping). Allowing this is asking for trouble later, so carefully supervise all of your pup's interactions with your children and their friends.
Once he's had his first shots (which the breeder should have already done with you) your pup can and should play with other vaccinated puppies and friendly adult dogs as frequently as possible. He needs to be weaned off this by the time he is 12 weeks old.
Bring him to the local park (always on leash) to be around other friendly dogs. Sign up for a puppy kindergarten class.
Bring him to your local pet store.
When he's playing with pups his own age, he may be more shy or more aggressive than the others. This is normal. Try not to pick up a shy pup or scold a boisterous one; he needs to learn his canine social skills from the other pups - the other pups will let him know what's OK and what's not.
When your dog is older you need to expose him to other dogs so he is comfortable around them but don't allow play. If you allow play the goal of making him indifferent to the presence of other dogs will be defeated. Dog parks are a very easy way to exercise your dog but it is a misconception that they develop social skill or help you judge your dogs social skill. They will set your dogs social skills back to the point of no return in some cases.
DO NOT Confuse Socialization With Play
The long term goal for socialization with any environment your dog is in especially if it includes people and other animals is to make your dog neutral to this stimulus. Your dog should never think that other dogs or other people are more fun then you are. Allowing this will cause many long term problems and make your training tremulously more difficult than it has to be. When a dog is a very young puppy (5-12 weeks) it is good to let them run and play with other young puppies as they are used to this with other member of the litter. But as he gets older (after 10-12 weeks) socialization should be done in a more subtle way through exposure not play sessions. The long term goal should be that your dog is indifferent when encountering strangers and other animals. Your dog should not want to run to them and play but should barely acknowledge them or even better not acknowledge them at all. You need to be your dogs number one play toy, if you can accomplish this you will be in for years and years of fun with your dog no matter how precise your actual training gets.