Parasites in general are a disturbing thought, but for some reason tapeworms are especially freaky—hence the Internet firestorm over NHL prospect Carson Meyer. For months, the 21-year-old was losing weight and feeling exhausted. Doctors couldn't figure out what was wrong with him, after 10 blood tests, including for mono.

Finally, a 25-inch, orange tapeworm came out of his body, People reported. “I was freaking out. Absolutely freaking out,” he said. Uhh, understandable!

Doctors told Meyer the tapeworm had probably been inside of him for over. a. year. Luckily, he's now feeling better–but how does that even happen?

All of this got us wondering about the medical specifics here, so we went digging. Here's everything you need to know—but were afraid to Google—about these unsettling infections.

First of all, what exactly are tapeworms?

Tapeworms are flat worm parasites that take up residence in the intestines of people and animals. There are a few species, but the one that most commonly occurs in the United States is Taenia solium, also known as pork tapeworm, according to the U.S. Centers for Disease Control and Prevention (CDC).

The “head” of the worm attaches to the wall of a person's intestine and absorbs nutrients. From there, tapeworms grow a bunch of little segments called proglottids, which contain eggs, and are often passed out of the body with the host's stool.

How do tapeworms get into your GI tract in the first place?

The most common way to pick up a tapeworm is through eating undercooked meat. Diphyllobothrium latum, the type of tapeworm Meyer had, comes from eating undercooked fish.

Some tapeworm eggs can survive for days or months in feces from infected humans or animals. If cattle or pigs eat infected excrement (usually because it gets into their feed somehow), the eggs can hatch and the larvae form into cysts that make their way into the animals’ muscles.

When the animal is slaughtered for consumption, the tapeworm cysts end up in the meat aisle at the grocery store. If the meat is cooked properly, the larvae die, and the meat is safe to eat. But if you eat it raw or undercooked, a larva can enter your GI tract, where it develops into an adult and can grow up to 25 (!) meters long, depending on the species. (That's 82 feet, for the metric-challenged.)

So then how did it get into that one guy's brain?

In 2015, Luis Ortiz, a 26-year-old man in California, had a “still wiggling” tapeworm pulled from his brain—shudder. The Internet erupted over how serious his infection was: He needed emergency brain surgery, and he ultimately spent close to three months in the hospital recovering. Thankfully, what happened to Ortiz is rare, and tapeworms aren't nearly that dangerous in most cases–but tapeworm larvae can travel in your body and survive in brain, liver, and lung tissue.

The good news is that in the United States, this kind of infection—called cysticercosis—is extremely rare. It's usually caused by ingesting the pork tapeworm eggs directly from infected human fecal matter.

This usually means that you get it from eating something contaminated with feces from another infected person. Also: it's possible to develop cysticercosis after ingesting your own feces (another reason to wash your hands after you use the bathroom); that’s called autoinfection.

Cysticercosis can be very dangerous: When a person ingests these eggs, the larvae can invade the intestinal wall and travel to your organs. If they reach the brain (a potentially fatal condition called neurocysticercosis), that can cause seizures and other neurological symptoms.

How common are they?

While tapeworms are common all over the world, they tend to show up most in Latin America, sub-Saharan Africa, and parts of Europe and Asia. This is why Americans often think of tapeworms as a hazard for international travelers.

The CDC estimates that fewer than 1,000 people in the United States are infected with a tapeworm each year. According to Peter Jay Hotez, PhD, MD, dean of the national school of tropical medicine at Baylor College of Medicine in Houston, Texas, no one is doing active surveillance for tapeworms in the U.S., and so that number is probably a “vast underestimate.”

Still, there is no evidence to suggest that tapeworms are hanging out in every other deli or restaurant, by any means.

What are the symptoms?

As far as relationships go, the human-tapeworm pairing is unrequited. Contrary to what humans think—get out, get out, get out!—tapeworms are perfectly happy in our GI tract. (Hey, it’s warm and there’s free food.) And they’re so well-adapted to the human body that adult worms often don’t trigger any symptoms in their hosts at all; when they do, it’s usually a stomachache, diarrhea, or weight loss.

So how do you find out that there’s a parasite in your body? Well, there’s a decent chance that you won’t. “[Tapeworms] have a normal life cycle,” Dr. Hotez says. “They can live for up to a few years and then they die.” When that happens, the host simply passes the tapeworm, or it gets absorbed by the intestines.

How do I find out if I have a tapeworm?

Their eggs will show up in your stool. So, well, there's no nice way to put this: most people have to have their poop analyzed to confirm infection.

After providing a stool sample, a doctor will look under a microscope for the eggs, which are less than 1,000th of a millimeter in size, Dr. Hotez says. From there, doctors will likely treat the infection with praziquantel, a very effective antiparasitic drug.

You can also pass a whole proglottid segment in your stool, and if you happen to see it moving—yes, moving—before you flush that’s another tip-off.

How do I prevent a tapeworm infection?

Since most people get it from raw or undercooked meat, the best advice is to really be sure you're fully cooking meat, the CDC says. If you’re cooking whole cuts of beef or pork, use a food thermometer to check that the temperature reaches at least 145° F (63° C) for whole cuts and 160° F for ground meat.