Always make sure to properly cook your food. That goes without saying. Properly cooking your food will help you avoid getting parasites. But... I guess... if you're still interested in having a tapeworm, but don't want to down a couple dozen raw steaks in the hopes of getting one, you can just play Tapeworm, a new tile-laying game that's up on Kickstarter now.
From the campaign:
The campaign's more than 12x funded with 29 days left to go.