Tapeworms come from fleas, and other species of
worms are picked
up by the dog from off the ground. But if one of your dogs has
worms, and the other dog is kept in the same environment, then there is a good chance that the second dog can get the same worms.
Prevention is key, when it comes to worms. Personally, I give Interceptor for my monthly heartworm preventative, and it pretty much takes care of hookworms, roundworms, and whipworms, as well as heartworms.