These sensors contain tiny resistive heaters and small electro-chemical sensors that vary their resistance depending on the concentration of gas that they detect. Depending on the series, they can detect gases such as LPG, butane, propane, methane ,alcohol, hydrogen and smoke.
|MQ 2||LPG, butane, propane, methane, alcohol, hydrogen, smoke and more|
|MQ 5||Butane, propane, methane, hydrogen and other combustible gases|
These sensors have incredibly simple interfacing circuitry - simply apply 5V to the two heater terminals and the A-terminal, connect an external resistor to the B-terminal, and monitor the B-terminal's voltage using an ADC. Pin outs and all other information you need is in the datasheets.