There are several types of worms that can infect dogs.
Tapeworms, round worms, and hookworms are the most common. The adult worms and their eggs can be ingested by coming in contact with contaminated soil, sand, feces, fleas, and rodents. Hookworms can enter through the skin and the paw pads. Dogs can get them from grooming and shared spaces with other dogs like dog parks, kennels, and doggy daycares. Puppies can get worms from their mothers with fatal consequences. It is actually pretty easy for dogs to get them. So, now what?!
Worms can be life threatening not only to puppies, but also older dogs and dogs with compromised immune systems as some worms utilize the nutrition from the dog's food. Over the counter de-wormers can work. However, if the the dogs don't respond to over the counter de-wormer, a full examination should be done by your veterinarian and medication should be taken as prescribed. My dog, Betty, got them a few years ago from an apartment doggy park where we were living. I noticed the worms in her feces. She didn't exhibit any other signs of illness. Symptoms often include, changes in appetite, loss of energy, poor hair quality, bloody stool, scooting, and excessive licking in genital area, diarrhea, more potty accidents, and in severe cases, distended abdomens (usually with puppies). Once discovered, I took Betty to the vet immediately, administered the medicine as prescribed and she has been fine ever since. Our vet also put her on a flea medicine that included an anti-parasitic. Humans can contract worms as well but not usually from their pets. So, there is no need to freak out too much. Wash your hands often, vacuum, and clean their bedding or replace it. I didn't let Betty kiss me or sleep with me for a week when she was infected. I just couldn't. Although, as a kid, I did get. case of worms from our household puppy. My mother was pretty horrified. I think I was six or seven years old.