Tapeworms are a type of parasite, meaning that they depend upon another organism, the host, to provide them with food. In doing so, they negatively impact the life of the host, usually by robbing them of nutrients or by subjecting them to physical trauma or an increased risk of infection. The difference between beef and pig tapeworms is largely nominal, meaning that while the specific species of tapeworm may be different, the way they act upon the animal is the same.
Tapeworms are typically ingested by the animal and latch onto some portion of the animal's intestine. There, they grow by absorbing nutrients. When prepared for reproduction, the tapeworm will lay eggs that are then passed out of the animal's body via feces. These eggs must then be ingested in order to continue the life cycle.
Practically speaking, (and, apologies for edging toward distasteful details, but it's necessary) consumption of feces is not required for transmission of the tapeworm; contamination is often enough, such as by water sources being unsanitary. For example, if humans drink from the same water that animals pass through, without boiling the water sufficiently, they may ingest the tapeworm.
Ingestion is also possibly by consuming contaminated animal meat; while the tapeworm and its eggs are not normally found in every portion of the animal's meat, unsanitary butchery and cooking may bring edible meat in contact with the animal's intestines, thereby contaminating it.
Ingestion and infection of adult tapeworms has few or no symptoms or fatal long-term effects, but ingestion of the eggs of T. solium, the pork tapeworm, carries the risk of infection with cysticercosis. This condition is caused by the tapeworm larvae infecting body tissues by passing through the intestinal lining. Therefore, the pork tapeworm may be considered more harmful.