Most of them need a prescription, but a lot of supply companies have catalogs that you can have your vet fax the script to and pay much less for them. It's not that the dogs get the worms a lot, it's more of a preventitive measure.
Tape worms are transmitted when a dog or cat eats infective eggs, which live in the soil or larvae, which live in small rodents. They are more common among hunting dogs. The easiest way to diagnosis the tape worm is by seeing tapeworm segments, which look like rice, in the stool, near the anus, or on the pet's fur.
Round worms are transmitted through ingestion of its eggs in an infected rodent, infected soil, or milk from an infected mother. The eggs hatch into larvae in the stomach, and the larvae travel to the small intestine where they mature into adults. The adults lay eggs, which pass out of the pet in its feces. Severe infection can create intestinal obstruction.
Hookworms are transmitted by ingesting the infective larvae (which usually live in soil) or by the larvae attaching to and burrowing through the dog's skin. Once inside the dog's body, larvae travel to the small intestine, mature, mate, and lay eggs. The eggs pass into the soil through the dog's feces. The worms feed on the host's blood.
Whipworms are transmitted by ingesting infective eggs that live in the soil. Once they're inside the host, the eggs hatch into larvae that travel to the large intestine and embed their long, whiplike tail into the intestinal wall. The larvae mature, mate, and lay eggs, which pass through the feces and into the soil.