Whenever different metals are placed in a conductive liquid, such as salt water, you create a battery. If you connect these pieces of metal together, current will flow. This current, trying to equalize the conductivity of the metals, will be removing metal from one of the metal pieces. This removal is called "electrolysis". If the piece being removed is the zinc in your flashlight battery that is good, but if one of the pieces is your propeller it is bad.
When you pull your boat to do the bottom you may wonder what those pitted, ashen-white pieces of metal are on your shaft, rudder or possibly on the transom. These are called zincs and, as luck would have it, are made of zinc. The zincs you use on a boat are called "Sacrificial Anodes". Zinc is used because it has a higher voltage in the water so the current will be more inclined to flow from it than from your propeller.
To complete the electrical circuit, the zincs must be connected to the items they are intended to protect. Usually this is no problem because the zinc is bolted right to the shaft or underwater housing. Non-metal boats will usually have a copper bonding wire inside that connects all the underwater metal items together so they all share the protection from zinc anodes.
Since engines use the metal frame as the negative battery connection and the engine is connected to the prop shaft, the engine and the negative side of your 12 volt system are also part of this bonding connection. This bonding wire may also be connected somewhere to the rigging. This is not for electrolysis protection but for some protection from lightning strikes to conduct it into the water through the items connected together.
If other currents are allowed to get into this bonding circuit they can easily overpower the small voltage available from your zincs and defeat the protection you need. This is usually the most destructive form of electrolysis and you notice it because your zincs get eaten up very quickly trying to keep up. Under normal circumstances, zincs should last at least a year if they are working normally, and much longer if you don’t have any problems. If they are being "sacrificed" in a shorter period you need to find where the external current is getting in.
The most common source of this external current is the shore power connection, sometimes referred to as stray current. Docks are notorious for bad wiring and often the ground lead is not connected to ground, but is connected to the neutral and is being used for carrying current to a poorly wired boat. The purpose of the shore power ground lead is to provide a return path for current if there is a short circuit or power leakage from an appliance or the wiring on the boat.
There are other sources of electrolysis that you can’t correct. The boats on each side of you in the marina may be connected together through the dock ground lead and one may be eating up the zincs rapidly on the other. If you sit between them, this current may take a short cut by going in an item near one boat and exiting via your zinc near the other. This will eat up your zinc too, even though you are not connected to the other boats. The best solution here us to use zinc fish while you are at the dock. They are large lumps of zinc, often cast in the shape of a fish, that are cheaper and easier to replace than the zincs on your shaft.
The "fish" come with a copper wire already attached which is also used to hang them in the water. They have an alligator clip on the end of the wire and this should be connected to the negative bonding circuit on your boat. If it is not conveniently available in the cockpit in the vicinity of the prop, you might consider installing a stainless bolt for clipping it to, with the head of the bolt inside the deck connected to the negative bonding system. Clipping it to the shrouds or railing will only work if somewhere on the boat the shrouds are connected to this boat negative bonding system.