"Styrofoam" is the brand name of a specific type of expanded polystyrene foam produced by Dow Chemical Company and is usually used in boat construction and building insulation. There are many other brands of disposable expanded polystyrene foam food and beverage containers, and their response to microwaving depends primarily on the temperature of the food or drink within them.
Making the Foam
Polystyrene is a polymer made of identical, repeating chains of styrene molecules. Styrene is a plastic formed by combining the hydrocarbons benzene and ethylene. Polystyrene foam products are made by puffing polystyrene with pentane or carbon dioxide gas and then molding it. Polystyrene foam can be melted into hard polystyrene nuggets, but cannot be "refoamed" without the gas-puffing process.
In the Microwave
The U.S. Food and Drug Administration regulates disposable and microwaveable food containers based on their likely length of contact with food, temperature and possible chemical leaching. Microwaves heat the water within food, which transfers heat to the solids and container. If this water boils -- 212 degrees Fahrenheit -- it can melt polystyrene foam and release styrene gas. Styrene gas from food containers has been implicated in the proliferation of human breast tumor cells, according to a 2001 study conducted by Tokyo Metropolitan Research Laboratory of Public Health and published in Environmental Health Perspectives. However, no endocrine-disrupting or carcinogenic activity in a 2002 study by Date, et al., published in the same journal. Foam containers labeled "microwaveable" are considered safe provided they're heated to less than 212 degrees Fahrenheit.