Taenia solium eggs are excreted in the feces of infected humans. These eggs can contaminate food, water, and soil. When pigs ingest the eggs, the larvae develop into cysticerci within the pig's tissues. Humans can become infected by consuming undercooked or raw pork containing these cysticerci. Additionally, humans can become infected directly by ingesting the eggs through fecal-oral transmission, often due to poor sanitation and hygiene practices.