TL;DR:
This variety of tapeworm has 2 modes.
-
When eaten as an egg (from feces), it hatches in the body and enters muscle tissue, ready to spread to another organism that eats the meat of the infected animal.
-
When eaten in meat (e.g. pork), the worm grows in the intestine to spread eggs through feces, continuing the cycle.
This man had intestinal tapeworms, which were treated, but he managed to re-infect himself via poor hygiene (i.e. consuming some residue of his own feces containing eggs). So he was infected with the muscle-burrowing stage, and one of them managed to somehow enter a blood vessel and travel to his brain.