Most Traditional Double-Action (DA/SA) semi-automatic pistols are designed to be carried with the hammer down (uncocked) on a chambered round, with or without a manual safety engaged. The pistol is considered safe in this state as the "double-action" pull that both cocks and fires the weapon is both longer and heavier than the "single-action" pull that simply releases the cocked hammer. However, the act of chambering a round on such a weapon automatically cocks the hammer. To return the pistol to its safe state, it is necessary to "de-cock" the hammer; this is traditionally done by holding the hammer spur, pulling the trigger, and then slowly lowering the hammer. This process is dangerous if done carelessly or in adverse conditions, and it violates the third rule of gun safety; "keep your finger off the trigger until you wish to fire".
A Decocker or decocking lever allows the hammer to be dropped on a live cartridge without risk of discharging it, usually by blocking the hammer or retracting or covering the firing pin before releasing the sear. This eliminates the need to control the fall of the hammer, although since all mechanisms can fail it is still necessary to keep the muzzle of the gun pointed in a safe direction while operating the decocker.
A decock/safety is a combination manual safety switch and decocking lever. Two popular variants exist. In the "three-way" system, made popular by Heckler & Koch pistols, the handler may decock the weapon by pushing down on the safety lever from the "Fire" setting, or engage the safety (even on a cocked weapon) by pushing the lever upwards. A simpler "two-way" system was popularized by the Beretta 92; engaging the safety also decocks the weapon.
The Sig Sauer line of pistols such as the SIG P226 frequently feature decocking levers. The earliest use of a single-action decocker was the Vis Wz 35 redesign in 1932 to enable horsemen to safely holster their weapon with one hand. The earliest use of a cocking/decocking lever is the Sauer 38H from 1938. Ruger until 2007 manufactured "decock-only" variants of its P-series pistols, and the "two-way" decocking safety has been available on these pistols since their introduction.