Modifying a Simple Transformer Circuit
It looks like you're trying to repurpose a charger that was originally intended for some sort of tool battery, judging from the socket built into the case.

It also appears that said battery leaked at some point into the charger, given all of the crud all over the case, contacts and PCB.

You really need to clean the corrosion off of everything, and verify that all of the connections on the PCB and the rest of the wiring are still good.

The relay is probably there to switch between "fast" and "trickle" charging modes, as indicated by the labels on the LEDs. It would be worth your while to trace out the circuit and draw a schematic diagram, so that we all have a reference for further discussion.