There are a variety of ways to treat constipation in dogs. First walking or running around helps. Small amounts of human constipation medication can be given as directed by a vet. Also preventing it in the first place can be done with dietary fiber and lots of water. If your dog is constipated you should see a vet to rule out more complex causes.