Using relay module with arduino

Hi,
Here is a diagram of the way the opto-isolation works:

JD_VCC is the power to the RELAY coils. In your case that is 24V.