"I failed a polygraph test, but I'm not sure I lied-- what does that mean?"
It is a scored system, mostly developed using your tax dollars. The US Government's polygraph center has studied lie-detection for decades, and their findings trickle down to the private sector.
During a polygraph test, the equipment records microscopic changes to the body at 4 points as they answer various types of Yes or No questions. The government polygraph studies have shown that scoring certain combinations of reactions almost always indicates truth or it indicates lie.
The equipment only records the body's microscopic data as the questions were answered; the scoring program, and the examiner's hand-scoring, take those body changes and following the government's scoring advise will call pass or fail.
TIP: small movements can hurt your score, so sit still during the test.