Socializing a dog to both humans and other animals is an extremely important part of its long-term happiness. When I first got my dog seven years ago, I initially thought I would be hogging her for myself. I didn't want her to interact with other dogs or get into trouble. I soon realized that part of a dog's nature to be part of a pack. Dogs need to be with their species sometimes, and socializing them is the only way to ensure their ability to integrate effectively into any new situation that may come their way.
The key to socializing success is to start very early. Puppies are born into a pack and, more often than not, quickly separated from that pack within eight to 12 weeks. At such a young age, dogs are able to learn good behaviors from other dogs and through training. They also want to be part of a pack, so whatever you can do to allow them to interact with other dogs is a good thing.
Once your dog is up to date with its shots, bring it to a puppy kindergarten, class or playgroup. These groups meet in every metropolitan city -- and even in small towns. They are essentially an opportunity for your dog to interact and play with other dogs and learn how dogs behave.
If you don't have a puppy group in your neighborhood, start one or go to a dog park during peak hours (before or after work). While interacting with puppies their age is helpful to dogs, it isn't necessary. The important thing is to put them in an environment where they can learn behaviors of other (preferably well-behaved) dogs.
Give your dog positive reinforcement whenever you observe good social behavior. You don't always have to give your dog treats. A hug, rub on the head or scratch on the butt will show your dog he's doing a good job. You should only reward your dog positively -- never punish it if it behaves badly. Soon enough, your dog will want to do good things to get good things, and will therefore do fewer bad things.
Be sure to socialize them with humans as well as dogs. The greater variety of people you allow your dog to play with at a young age, the more social it will be at an older age. Let your dog play with babies (gently), kids (energetically), men, women and older folk. The key to socializing is to provide your dog with opportunities to interact, and to be loved and appreciated.