Ok do you have worms or is it your animal? If its you and you have worms get some medication tablets and take as instructed. As discussing as it sounds I had pin worms and i had to take tablets that tasted like cardboard. Best to rid the parasites as soon as Posable.
You can go to the doctor and get pills if you like, but the main part of getting rid of them is getting rid of the worms but also the eggs. Most people will get rid of the worms, but they don't know the worm cycle, so when they "come back" a couple months later they think they caught them again. Basically worms lay all kinds of eggs in your intestines. You can kill the adult worms, but in a couple months the eggs are going to hatch again, so you have to get rid of the eggs also.
The most important part of trying to get rid of worms, and not get them again is to keep your fingers away from your mouth, and wash you hands a LOT. The eggs get in through your mouth at some point, and travel through and hatch again. You have to wash you hands a lot, wash your sheets a lot, and shower twice a day. Once before bed and once immediately after waking up. It's really important to do it when you wake up, because at night the worms come out and lay eggs in different places. Pretty gross :/