A cotter is a pin or wedge with a flat bearing surface passing through a hole to fix parts tightly together.
Typical applications are in fixing a crank to its crankshaft, as in a bicycle, and a piston rod to a crosshead, as in a steam engine.
The angle of the wedge determines the position of the parts being held; therefore, on a bicycle, the pedal arms will only be at 180 degrees to each other if the angle of the cotter pin's wedge is the same on both pins.
Formerly, it was common to mount bicycle cranks using a cotter, although now a more easily maintained arrangement is typically used, such as a square tapered or splined interface.
They are also used to secure ceiling fans to prevent falling if the mounting nut loosens.