Timer and smoke detector.

That link is for a carbon monoxide detector, not a smoke detector. Is that going to be OK? (Sounds dangerous!)

It looks like the type of board that has both analog and digital outputs (like the soil humidity sensors that are popular). The analog pin outputs a voltage depending on how much CO the module detects. The digital pin goes high or low when the CO reading reaches a threshold set with the little screw adjuster on the board (comparator).

So have a look at the tutorial examples about reading digital or analog pins.

Then move onto connecting your relay: make sure you use a diode and MOSFET or transistor or the relay will damage the arduino. Most ready-made relay boards have these built-in.