A 5V relay is a programmable electrical switch, which can be controlled by micro-controllers. It can be programmed to control on/off the devices when a certain event occurs. The relay acts as a bridge between Arduino board and high voltage application. The inside of the relay is connected to an 120-240V electrical switch. When the relay receives a signal, the switch will open or closed. In this Question, control the fan when the flammable gas is detected current will increase. And if it reaches certain range, the magnetic relay shift the switch and voltage from the battery will flow and operate the fan.