How do you treat a puppy that has worms in feces and are they contagious to other dogs or humans?

Anything in an animal's feces has the potential to be contagious. Consult dog's veterinarian and they can give you some medication for your puppy.