Cats generally get worms from eating wild dead animals that have worms, and can also get tapeworms from ingesting a flea that contains the tapeworm larvae.
Didn't find the answer you were looking for?