A safety pin is a simple fastening device, a variation of the regular pin which includes a simple spring mechanism and a clasp.
The clasp serves two purposes: to form a closed loop thereby properly fastening the pin to whatever it is applied to, and to cover the end of the pin to protect the user from the sharp point.