Treatment for worms in dogs depends on the age of the dog and the type of worms it has, according to WebMD. Most deworming methods involve oral or injected medications, but treating a dog for heartworm requires additional blood work, X-rays and other tests to diagnose the severity of the condition.
A veterinarian checks the dog's stool in order to identify the type of worm and prescribe a treatment, states WebMD. Generally, two doses of an oral or injected medication can treat an adult dog for tapeworms, hookworms, roundworms and whipworms. The first dose kills the existing live worms, and then the second, administered a few weeks later, treats those that have hatched afterward.
Treating puppies follows the same method, and veterinarians deworm puppies that are approximately two to three weeks old, explains WebMD. Worms can be passed from the mother before birth and after, during nursing.
Dogs that suffer from heartworms must receive monthly prevention, antibiotics and anti-inflammatory medications followed by an arsenic-based injection within a month, according to WebMD. The veterinarian administers the injection a few times over the course of two months. The dog requires extra attention at home in order to keep him calm and quiet. Heartworms block the flow of blood as they die off, causing a dog's heart to work harder during excitement or exercise. The condition can be fatal if not treated properly, and the dog must take preventive medicine for the rest of his life.