In the following diagrams there are two sections:
Internal section reflects a simplified version of the on-board circuit. The External section reflects the wiring that should be used.
Bi-directional Opto-coupler Input
You need an external power supply different from the one used by Raspberry PI, in this way the input circuitry is isolated from Raspberry PI. You could use the power supply from Raspberry PI but the trade-off is losing the isolation(not recommended).
The LOAD element in the following diagrams can be a motor, a light bulb, a heating element or something else.
The DC Source polarity doesn’t matter from the Relay Output point of view, it can matter for your load. The positions of the LOAD and DC Source can be interchanged.