How do decocking levers work?

Many (most?) automatics have decocking levers, usually integrated with the safety. They let you drop the hammer without it hitting the firing pin. How do these mechanisms actually work? Or are there multiple types? Do they put something between the hammer and firing pin? Do they change the hammer geometry?

And is there any significant failure rate associated with them? I doubt it, as I’ve never heard of one failing, and guns are typically extremely reliable - but it still makes me nervous every time I drop the hammer on a live round outside of range conditions. Is there any reason to be?

From Wiki:

Looks like it depends on the gun.

In my Ruger P89DC, when you actuate the decock lever, a cam rotates that sticks out from the plane of the firing pin. The hammer then drops, and hits the protruding cam instead of the firing pin. It seems pretty foolproof, but I’m still careful…

I haven’t really looked into the mechanism, but my Beretta doesn’t drop the hammer completely down to the firing pin. The hammer stops about a sixteenth of an inch from the pin. I presume that if the hammer drops the rest of the way there’s not enough impact to fire the chambered round.