People tell lies and practice deception for a lot of reasons. Psychologists say lying is a defense mechanism used to avoid trouble. Sometimes, you can tell when someone's lying, sometimes not.
From personal experience I can tell you that lie detector tests are useless. Years ago my employer hired a former police officer who was an "expert" lie detector operator and we all had to take a "sample" test just so we would know what they were like. After taking mine, the examiner told me I was deceptive in my answers about my alcohol and drug use. I use neither, but after the test he told me, "Everybody drinks and we've all smoked a little pot." He was influenced by his own beliefs. On one occasion I had to escort an employee to a test and the examiner privately asked me if I thought the subject was guilty. I believed the employee was guilty of stealing, but refused to tell the examiner simply because I did not want to influence his decision.
Polygraphs (lie detectors) are incapable of telling if a person is lying. They measure physiological reactions, nothing more. When a person is questioned about an incident the examiner looks to see how the person's heart rate, blood pressure, respiratory rate and sweatiness of their fingers change in comparison to normal levels. Fluctuations may indicate that person is being deceptive, but exam results are open to interpretation by the examiner.
Polygraph examiners look for involuntary responses when a person is subjected to stress, but the whole idea is more myth than reality.
First of all, questions asked by the examiner are not standardized and the type and manner in which the examiner asks the questions can, in many cases, can cause stress that can be interpreted as lying.
The recording instrument and questioning techniques are only used during part of the examination. There is usually a pretest where the technique is explained and each test question reviewed. The pretest interview is designed to ensure that subjects understand the questions and to get the subject to thinking about the questions.
Sometimes, in order to "prove" the point that you can't beat the machine, examiners administer what is known as a "stimulation test." In our case on the job, it involved the examiner doing a card trick where we were told to answer "No" every time he asked "Is this your card?" He showed us the wrong card a couple of times so a "No" answer was truthful. Then he shouted, "It's this card isn't it?"and slammed down the right one. Proud as a peacock, he pointed out that everybody's heart rate, breathing and sweating increased with the "No." response. This was supposed to "prove" the machine couldn't be beaten. I'm not sure if it was the result of our lying or if it was because of the startling effect of his yelling and slamming the card down. Another wrong card may have resulted in the same response!
Several questioning techniques are commonly used. The most widely used compares responses to relevant questions to those of "control" questions. Control questions are about misdeeds that are similar to those being investigated, but not the actual misdeed under consideration. A relevant question concerns the misdeed itself.
A person who is telling the truth is assumed to be more fearful of the control questions than the relevant questions because the control questions are designed to arouse a subject's anxiety about how they will answer a question that is related to their misdeed.
Examiners look for a pattern. A greater physiological response to relevant questions will result in the conclusion that the subject is lying. A greater response to control questions leads to a judgment that the person is being truthful. If the examiner can't see any difference in response to relevant and control questions, the test result result will be deemed inconclusive.
There is also an alternative procedure that involves a multiple-choice test with items concerning knowledge that only a guilty subject could have. Because the guilty suspect knows the correct answer a larger physiological reaction to a correct choice would indicate deception. This test can only be used when investigators have information that only a guilty subject would know. Another limitation is "not deceptive" verdict may indicate nothing more than the subject's lack of knowledge, not their innocence.
The accuracy of the lie detector has long been controversial because there is no evidence that any pattern of physiological reactions is unique to deception. An honest person may be nervous when answering truthfully and a dishonest person may just be a pathological liar. Another thing that will affect the test is whether or not the subject actually believes the test works. A subject who believes in the test may be very anxious when questioned.
There is also evidence that strategies exist that will beat the test. As a result, examiners may resort to countermeasures, including physical movements, trying to manipulating the subject's belief about the effectiveness of the and the use of drugs.
Polygraph testing has generated considerable controversy. Most psychologists and other scientists agree that there is little basis for the validity of polygraph tests. Courts, including the United States Supreme Court, have repeatedly rejected the use of polygraph evidence because it is unreliable.
Nevertheless, sometimes it's still used. For example, the US Border Patrol uses lie detectors to screen applicants. And, they do this even though the US Supreme Court has rejected their validity. Typical government inconsistency.
Polygraph testing continues to be used in non-judicial settings, often to screen personnel, but sometimes to try to assess the truth of suspects and witnesses or to monitor people on probation. Some people will voluntarily agree to take one just to convince others of their innocence.
The machine and examiner can be tricked though. One trick is to think exciting or scary thoughts when you recognize a control question (one similar to, but not relevant to the actual misdeed under consideration) or make yourself sweat. You can do that, for example, by trying to do a difficult math problem in your head. You can also bite you tongue because pain induces a similar physiological response as lying. Because these are control questions, you are messing up you response which in turn messes up the usual response. When answering a question that is relevant to whatever the real purpose of the test is stay calm.
Why this works is because even if you produce a slight response when asked an accusatory relevant question, you have artificially produced a stronger response when answering a control question.
So called "testing" using lie detectors is not standardize and is dependent on trickery and perceptions of the examiner so has absolutely no validity.