Carpet deodorizer works by releasing gas that smells bad to humans. This gas is created when the oil in the carpet is heated up. The gas makes it difficult for bacteria to grow and cause an unpleasant odor.