From the pictures there appears to be a relay connected on the mains side of the transformer but the pictures don't show clearly what wires are connected to it. Also I can't see the relay coil which may be slugged to allow operation on AC. The relay may form part of a latching/protection circuit in the vent of a welded electrode.
I'm struggling to determine if the device is AC operated essentially oscillating at 50Hz or DC with some form of rectifier on the secondary side of the transformer which I can't see in any of the pictures.
Anyway I think it is rather like a 50Hz buzzer. The coils on the other assembly somehow retracting the electrode from the workpiece creating the spark. As the mains cycle goes through zero the retraction is released allowing the electrode to drop down and make contact with the workpiece and the process is repeated.
From the info the electrode appears to be a brass tube which allows water to flush arc debris from the gap by gravity feed from a header tank but there may also be a degree of pumping as the electrode vibrates.
I've made similar simple eroders but these have used DC but it will work with AC.
CS