Please do not upvote this answer.
This is an expansion of @Krol's answer.
Krol may incorporate this material in his answer if he wishes.
The image below shows a typical relay module which is able to be driven by logic level / GPIO signals from typical microcontrollers.
The relays have 5V coils and there are optocouplers and drive transistors between the input and the relay.
Inputs are active LOW - ground to turn on.
These are available by mail from China for under $2/relay (under $1/relay if you buy 10 modules with several relays in).
They are NOTIONALLY opto-isolated as well as having relay isolation between input and contacts. BUT the PCB layout and relay design is such that mains to input clearances are poor. They will PROBABLY NOT kill you or your controller but they may - as is the case with much other items manufactured afar off at ludicrously low prices.
I have found the seller/manufacturer whose logo appears on that photo to be a reliable supplier of well made products. (Being well made does not overcome "dangerous design" as above.
Note that the above warning applies to most buffered relays you can buy on the hobbyist market and also top consumer products that have not been put through formal testing (UL etc). This relay board would fail UL testing - as would most others.