The ruff was a fashion of the late 1500s in western Europe, worn by both men and women. It was derived from the fabric that stuck up at the neck from a full, loose shirt with a doublet over it. This fabric was gathered a bit by the shirt's neckband, but at first there was about an inch of fabric to make a little frill over the doublet's edge. Doublet collars got higher, so the fabric at the neck had to get higher also, and then people started edging the neck frill with a fine cord to make its edge stay in a wavy pattern instead of flopping around.

Gradually, the fashionable frill of fabric got wider, and eventually it was detached from the shirt and sewn onto its own neckband. The neckband would most often fit the wearer closely and tie or button at the back, although ruffs open at the front and pinned to the sides of the bodice later became popular for women. The fabric sewn to the neckband could be as little as two or as much as nine inches wide, depending on how far over your shoulders one wanted it to stick out, and from a yard and a half to six yards long, depending on how many folds were desired. If you're going to sew eight or nine yards' length of fabric, even in pleats, to a neckband of, say, 15 inches, it's going to have to be very thin fabric, so the finest lawns, laces and cambrics were used by the wealthy for these long ruffs. The less well-off would wear a ruff made from a shorter length of a thicker fabric, and thus have fewer folds.

However, the thin fabrics of rich people's ruffs were less likely to stand up on their own, so an elaborate process was necessary to make and set the accordion folds. A professional laundress did the laundry of the wealthy, and would generally be responsible for resetting the ruff after it was clean. Thick starch paste would be brushed into each fold of fabric; although the ruffs themselves were usually ivory-colored, dyes were sometimes put into the starch to make them pale shades of pink, yellow, mauve, or blue (Queen Elizabeth I of England made a proclamation in 1595 that "Her Majesty's Pleasure is that no blue starch shall be used or worn by any of her Majesty's subjects," possibly because blue-starched ruffs were associated with prostitutes). After all the fabric was covered in starch, a little water was added to moisten it as the curves (wide or narrow as the owner had instructed) were set in with an round-ended, 18-inch "poking stick" of bone, ivory, wood, or eventually heated steel (a "goffering iron"). The stick would be pushed in toward the neckband to make a curve facing up or down in the damp starched cloth, and then the next curve would face the other direction. This took tremendous patience and skill to make all the accordion pleats the same size all the way around and not poke through the thin fabric. (And when using a heated stick, it also took skill not to burn the ruff in the process.)

Once starched, the ruff had to be handled carefully until time to put it on. It would often be stored in a box or pinned to draperies to avoid messing up the pleats; this would be something you carried along with you and waited until you reached your destination to actually put on and have pinned to your bodice or doublet. The wider "cartwheel" ruffs also required a "supportasse" of cloth-covered wire underneath to keep them from drooping. Eventually the partlet, a thin layer of fabric in between the ruff and the wearer's neck and down their front like a modern dickey, served to reduce the amount of washing needed. Sometimes people also wore more than one ruff (a wide white one with a smaller colored one above it, for example).

The ruff stayed in style until the early 1600s; first a "falling ruff" was created by no longer starching the ruffs worn open at the front, and then the pleats and folds were gradually abandoned. Modern recreators of the Elizabethan era have developed a few shortcuts (such as using an electric curling iron to set the folds of the ruff) but even so, ruffs require a lot of work and several sites give detailed instructions on their making.

Sources:
Picard, Lisa. Elizabeth's London: Everyday Life in Elizabethan London. New York: St. Martin's Press, 2004.
http://costume.dm.net/ruffmake.html
http://www.faucet.net/costume/period/ruff.html
http://www.reddawn.net/costume/ruff.htm
http://www.vertetsable.com/demos_ruffs.htm
http://www.earlymusic.i12.com/general/eliz_c.htm
http://www.cwu.edu/~robinsos/ppages/resources/Costume_History/cavalier.htm