Relays are in general two types
- Low Level Trigger (more common)
- High Level Trigger.
When a relay is OFF the COM (for common) connects to NC (Normally Connected)
When a relay is ON the COM connects to NO (Normally Open)
A Low Level Trigger Relay is turned ON when the input signal is LOW (logic LOW) AND is OFF when input signal is HIGH (logic HIGH)
A High Level Trigger relay is turned ON when the input signal is HIGH (logic HIGH) and OFF when input is LOW (logic LOW)
For a 5V low Level Trigger Relay, that you usually find on the market, the logic low is usually 0V and logic high is 5V. These relays can be completely turned ON/OFF by an Arduino or any microcontroller that can output 0V-5V. Since a RPi can only output 0V-3.3V it is not always enough turn OFF these relays unless you use a level shifter/voltage converter. BUT there are 5V relays with opto-coupler (black thing on the input side) that are turned OFF even when input is 3.3V but i still would suggest a logic level shifter circuit.
So you have two options to have reliable circuit
Use a 3V relay that is more compatible with Rpi.A 3V relay can
handle 3.3V that a RPi outputs and should be good enough for
prototype testing. But in a finished product you would want a
voltage divider/or down level shifter to bring down 3.3V to 3V
Use a 5V relay with up-converter to convert the 3.3V of RPi to 5V.
Which option you choose is up to you but the 5V relays (especially
multi-channels) are more easier to obtain.
Note 1: Also note down the current required to power on the relay (current to the Vcc of relay). A 5V of raspberry pi can output more current than the 3.3V rail. If you have multiple relays connected to 3.3V or 5V the total current requirement should be within the limits of these rails otherwise you may end up damaging the RPi or not being able to turn on the relays or both.
Note 2: Also note the current rating on the output side the relays can drive. A relay to drive AC loads may require higher output drive current that DC loads. This you can easily see written on the relay itself
Note 3: Usually the logic LOW and logic HIGH voltages can be a bit higher and lower respectively for any digital electronic circuit i.e. logic LOW can be 0V to 0.3V similarly 4.7V - 5V is logic HIGH. The actual values 0.3/4.7 will depend on your chip and you can get it from the datasheet