Dogs with worms can show a range of symptoms, depending on the type of infestation. For example, you may see roundworms in his vomit or tapeworms in his stool; others you'll never see but they'll affect his health. If you see evidence of worms or you suspect them, get the vet to test.
Confirming and Treating
Your dog needs to be wormed only if he actually has worms -- otherwise, he can simply take an over-the-counter preventative, typically a topical or oral treatment that inhibits worms and usually one or more other parasites. Even if you're thoroughly convinced by your dog's symptoms that he has worms, take him to the veterinarian for confirmation and diagnosis of severity. The vet will prescribe a worming medication or another course of treatment -- heartworm, for example, may require a series of in-office injections to kill the parasite.