If you’ve been online at all these past few weeks, you probably heard about Luis Ortiz, a 26-year-old man in California who had a “still wiggling” tapeworm pulled from his brain—shudder.

Parasites in general are a disturbing thought, but for some reason tapeworms are especially freaky—hence the Internet firestorm over Ortiz’ story. Making it even scarier is how serious his infection was: he needed emergency brain surgery; ultimately he spent close to three months in the hospital recovering.

All of this got us wondering about the medical specifics here, so we went digging. Thankfully, we learned that what happened to Ortiz is rare, and tapeworms aren’t nearly that dangerous in most cases (though they remain ridiculously disgusting). Here’s everything you need to know—but were afraid to Google—about these unsettling infections.

RELATED: 18 Most Sickening Food Ingredients

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.

Some 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.)

RELATED: 14 Types of Foods That Can Make You Sick

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

Tapeworm larvae can travel in your body and survive in brain, liver, and lung tissue. But 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.

RELATED: 10 Risk Factors For Inflammatory Bowel Disease

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,” Hotez said. “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 tape worm?

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, Hotez said. 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.

This article originally appeared on Health.com.