Function
The can is filled with a polymer-based resin which is propelled from the can as a foaming liquid. The string solidifies in air, quickly enough so that when it lands, it is "string."
History
Silly String was invented by Robert P. Cox and Leonard A. Fish in 1970, patented in 1972 as a "foamable resinous composition." They initially licensed rights to Wham-O, before selling to the Car-Freshener Company in 1997.
Warning
Silly String is flammable and can stain clothing. It can damage vinyl, including vinyl wallpaper, counters and parade balloons. Clean-up can take a while. In certain places, such as Huntington, N.Y., Silly String and its lookalikes have been banned.
Military String
The military uses Silly String to detect booby traps in Iraq. The string is light enough to land on invisible trip wires without actually triggering them.
Fun Fact
A can claims to containt over 400 feet of string.