A clothespin (also clothes peg, or just peg) is a fastener used to hang up, and dry clothes, for drying, usually on a clothes line. Pegs often come in many different designs.
Today, many pegs are manufactured very cheaply by creating two interlocking plastic or wooden prongs, which in between is often wedged a small spring. By a lever action, when the two prongs are pinched at the top of the peg, the prongs open up, and when released, the spring draws the two prongs shut, creating the action necessary for gripping.
Older designs do not use springs, but often are fashioned in one piece, with the two prongs part of the peg chassis with only a small distance between them - this form of peg creates the gripping action due to the two prongs being wedged apart and thus squeezing together in that the prongs want to return to their initial, resting state. This form of peg is often fashioned from plastic, or originally, wood.
Clothes pegs with springs used to fascinate young children and served as raw material for various contraptions: fire-throwing catapults, mousetraps, pistols, detonators, not to mention various Rube Goldberg machines.
Clothes pegs are used in BDSM to induce minor amounts of pain, canonically as impromptu makeshift nipple clamps, but are also applied to other parts of the body.