A hairpin is a small clip or pin that's used to secure hair in place. A bride's fancy braided hairdo usually requires many hairpins and plenty of hairspray to hold it.
A bobby pin is one type of hairpin, a small bent piece of metal that pins strands of hair against the scalp. Most hairpins share this narrow, bent shape, and it's from this sharp angle that the term "hairpin turn" gets its name. A bend in a road that doubles back in a tight curve is a hairpin turn or a hairpin bend. This slang meaning dates from the early 20th century.