A small amount of Styrofoam shouldn't cause any health problems, but it does contain some harmful chemicals. According to the AAFP, foreign objects usually pass through the digestive tract without requiring medical intervention.
Styrofoam is a foam plastic that is made from styrene monomers. It is popular as an insulator in packaging and for food. There are hazardous chemicals in Styrofoam, including styrene and diethylhexyl adipate. When exposed to heat or acids, these chemicals can leach out of the Styrofoam in small amounts. This is partly why Styrofoam is not considered microwave-safe, as the plastic also breaks down easily. However, if used to drink or eat cool items, Styrofoam is safe.
The American Academy of Family Physicians says that most foreign objects pass easily through the digestive tract without causing problems. If a small amount of Styrofoam is accidentally eaten it probably won't harm the body. A large amount of Styrofoam may get stuck in the esophagus, stomach or the intestines. It won't be digested, potentially blocking the system up and causing problems. After an examination, the doctor may decide to remove the blockage by pulling it out or pushing it through the tight spot. This depends on where the Styrofoam is caught in the body.