A dog that is limping may simply need some quick first aid or may have a broken leg. Look at the leg gently and also consider the circumstances. If your puppy got a paw stepped on by your adult dog and is running around screeching and holding the leg up, simply catch her, calm her down, and wait five minutes. Most likely she will be fine. On the other hand, if you hear the squeal of brakes, look out, and see that your dog has escaped the yard and is running off on three legs, the odds are much greater you have a serious injury.
If a leg is dangling, there is obvious bone showing, or your instinct is that you have a serious injury, go to your veterinarian. Support the leg as carefully as you can, as motion will cause more damage. A quick splint made from a cardboard roll and a towel may help. Have someone help keep the dog quiet while you drive.