Styrofoam does contain poisonous chemicals, but it is generally safe as a container for food and beverages after service. Microwaving food or drinks inside styrofoam is not recommended, though, as the microwaving process can cause the toxic chemicals to leach from the container into the food.
The toxins that are present in styrofoam threaten overall health and have particularly damaging effects on the reproductive system. Because styrofoam is made with petroleum, after people throw containers away, those same toxins can leach into the soil and eventually the groundwater, poisoning animals and other species that come across them. Many animals that do not suffer from poisoning as a result of styrofoam end up choking or having digestive clogs after eating the foam pieces.