They measure certain physical responses such as pulse, sweating, blood pressure, etc. which might be reactions to lying. However—some people don’t have reactions because lying means nothing to them, therefore no reaction.
I beat a lie detector test when I was twenty-one. I admitted to stealing from my employer (copier paper, unsold merchandise) but denied ever being fired from a job— I was grilled over whether I had quit because I knew, believed, or feared being fired or had reason to believe— or whether I was asked to resign or resigned in leui of being fired— and every time I lied and not once was caught.
The lie detector tests are meant to determine a person’s honesty—not their crimes. You can be honest about what you’ve done or are and generally there will be no reaction the machine will measure. However, they are unfair (what if you were unjustifiably fired, or fired for exposing a problem or reporting someone?)— and unreliable—and subjected to interpretation (they don’t register ‘true’ or ‘false’ but a person’s reaction to the question and their own response) —therefore are unreliable and usually illegal.