Diglycolamine works by chemically reacting with acidic gases, forming stable compounds that can be easily separated from the gas stream, resulting in cleaner gas output.