The main thing that distinguishes spiders from the rest of the animal kingdom is their ability to spin silk, an extremely strong fiber. A few insects produce similar material (silkworms, for example), but nothing comes close to the spinning capabilities of spiders. Most species build their entire lives around this unique ability.
Scientists don't know exactly how spiders form silk, but they do have a basic idea of the spinning process. Spiders have special glands that secrete silk proteins (made up of chains of amino acids), which are dissolved in a water-based solution. The spider pushes the liquid solution through long ducts, leading to microscopic spigots on the spider's spinnerets. Spiders typically have two or three spinneret pairs, located at the rear of the abdomen.
Each spigot has a valve that controls the thickness and speed of the extruded material. As the spigots pull the fibroin protein molecules out of the ducts and extrude them into the air, the molecules are stretched out and linked together to form long strands. The spinnerets wind these strands together to form the sturdy silk fiber.
Most spiders have multiple silk glands, which secrete different types of silk material optimized for different purposes. By winding different silk varieties together in varying proportions, spiders can form a wide range of fiber material. Spiders can also vary fiber consistency by adjusting the spigots to form smaller or larger strands.
Some silk fibers have multiple layers -- for example, an inner core surrounded by an outer tube. Silk can also be coated with various substances suited for different purposes. Spiders might coat fiber in a sticky substance, for example, or a waterproof material.
Spider silk is incredibly strong and flexible. Some varieties are five times as strong as an equal mass of steel and twice as strong as an equal mass of Kevlar. This has attracted the attention of scientists in a number of fields, but up until recently, humans haven't been able to get much out of this natural resource. It's simply too hard to extract silk from spiders, and each spider has only a small amount of it.
This may change in the near future. Researchers at a company called Nexia Biotechnologies have genetically modified goats using silk-producing genes from spiders. The hope is that a small number of goats will be able to produce a large amount of silk material in their milk. Engineers will be able to put this material to work in aircraft, bulletproof vests and artificial limbs, among other things (check out this page for more information).