The name for a cord or strap that is worn around the neck to hold an identification badge, whistle, keys, cell phone, thumb drive or other small object.
Lanyards come in various colors and types and can also be used as a tchotchke: an advertising tool with customized logo or name printed on the strap. However it's totally geeky to walk around with a lanyard so you may want to take it off when venturing out into the real world otherwise you will be typecast as a modern version of the plastic pocket-protector set.
A lanyard can also come with different hardware. The O-ring is common for using with a whistle or keys. It may also have a split-connector so that it is easily removed and snapped back into place. A swivel snaphook is good for ID badges that have a rectangular hole at the top, and the bulldog clip is the type that when squeezed, both serrated jaws open, similar to how an alligator clip works.
Lanyards are used by businesses, schools, hospitals, at special events, conventions, reunions, in many recreational activities, and for backstage passes, etc., and because they are conveniently worn around the neck, they are considered more convenient than the clip style (which results in the dreaded wall humping).