A safety pin, a variation of the regular pin, is a simple fastening device which includes a simple spring mechanism and a clasp. The clasp covers the end of the pin to protect the user as well as forms a closed loop fastening the pin to whatever it is applied to.
Safety pins have a large variety of functions, often used for fastening fabric, cloth diapers, or patching clothing. The clasp allows for protecting the baby from being jabbed. They are often used as accessories to jewelry. The Mycenaeans during the 14th century BC used fibulae in the same manner as modern day safety pins. They looked a lot like safey pins.
Walter Hunt reinvented the safety pin and patented it in April 1849. He then sold the rights for $400. Safety pins became congruent with the punk rock phase. Some claim the look came from Richard Hell although others, like Johnny Rotten, claimed they actually had a practical use. However, in the long run safety pins were used as a fashion statement more so than for practicality.