Protection by impressed current
The electrical current is generally provided by a transformer-rectifier and its negative pole is connected to the structure to be protected and the positive pole to a groundbed (anode) which is buried far enough from this structure. For example, for a pipe, the groundbed is generally located at 50 meters from the pipe, and even more depending on the groundbed current.
Protection by galvanic anodes
For very long structures (pipes), the galvanic anodes are buried deeper than 1,50 m and at a distance which is often more than 3m. The electric circuit which connects the structure to be protected with the anode has a measurement point. For the compact structures (underground tanks, etc.) the galvanic anodes can be fixed directly on steel (that prevents however the measurement of the output current).