The relay is activated when axle(s) go over the insulated outer-rail section. This applies the Accessory common or outer-rail to one side of the relay coil (7). The other side of the relay coil (8) gets constant power from Accessory hot - say 12VAC from your ZW.
When idle, the relay connects the C pin (6) to the NC pin (2). This applies Accessory Hot power to the Green signal. When activated the relay instead connects the C pin (6) to the NO pin (4). This applies Accessory Hot power to the Red signal.
Note that pin (6) and (8) are connected together.