A cotter pin is a mechanical fastener designed to hold one object from slipping off of another. The best example of this is using a cotter pin to prevent a wheel or gear to slip off of the end of a shaft.
There are specialized versions of cotter pins used in agriculture to allow reuse. A generic cotter pin is usually made of a metal flattened wire folded in half so one end has both wire ends and the other end has a loop. They are normally disposed of when removed and a new one is installed, especially in systems that have safety involved. There are also specialized castellated nuts or castle nuts designed to prevent their turning when a cotter pin is inserted through a hole in the shaft or bolt and captured through one of the slots in the castle nut. For some applications like the main nut that holds on the head of a helicopter rotor to the transmission shaft, this is sometimes called a Jesus nut where if the cotter pin falls out and the nut spins off you will get to meet Jesus.
The military sometimes uses more expensive safety wired bolts and nuts on aircraft instead of cotter pins. Some race vehicles also use safety wired systems to replace cotter pins.
Iron Noder 2017