Can someone explain and help me with this circuit?
Here's the circuit diagram based on my interpretation of the photographs.

  

U 1520 is a 15A diode. When the switch is closed the optocoupler in TLP 504A would be turned on and would shut-down the machine through a relay.

The circuit diagram may be verified for its correctness.

A relay driver circuit is shown below.