It clips the signal. In this case it will clip the positive or negative halves, depending on which way it is oriented. You can install two with the polarity in opposite direction to clip both halves. There is a band painted on one end of the diode. That is the cathode. The other end is the anode. The very first diodes were vacuum tubes (derived from the Edison light bulb, hence they called it the Edison Effect).
Diode - Wikipedia, the free encyclopedia
This is the same way many distortion effects work.
This works better with hotter pickups, because you lose a little signal. This is also what's inside the BlackIce passive distortion thing.