Styrofoam isn't safe for household insulation. It's very flamable and produces heavy black toxic smoke.
EPS is styrofoam, and is made by putting a bunch of polystyrene beads in a container, and then heating it up so they expand into a big block either in the desired final shape, or later cut into the desired size and shape.
XPS is foamed up with a blowing agent, previously an hyrdoflourocarbon gas (I don't know what's used currently), and then extruded into its desired shape.
Polyiso is its own animal, but I know little about it, other than it's not polystyrene.