The short answer is: they do not work—at least, not for finding the truth.
Real lie detection requires monitoring heart rate, blood pressure, respiration, and sweat (galvanic skin response). Randomized Results: free online lie detector test fingerprint