Generally speaking, polygraph doesn't work. Most of the "science" of polygraphy is fraud and fair nonsense, a holdover from when people beleived in graphology and phrenology. However, it sticks around, because it "works" better than any other interrogation method people have managed to cough up.
The interviewer doesn't particularly care if you're nervous, or if you get special involuntary responses to certain questions, or whatever. All of that is BS. What he's trying to get are the holy grail of "admissions."
Admissions are the good polygrapher's bread and butter. A polygrapher's main purpose is to do whatever it takes, with the machine as a psychological tool, to admit to doing something that would make you an unsuitable applicant for whatever you are interviewing for.
That doesn't mean that staying quiet will help you pass, even though its probably a good idea. Studies show people pass or fail polygraphs nearly at random in terms of their biometric readings alone. Essentially, the polygrapher ends up having to make up a bunch of crap, largely from his own intuition. And seriously, if you didn't really tell him anything, but weren't blatently lieing or whatever, he really has no clue what the deal is, and so he's going to put whatever crap pops into his head.
Nonetheless supposedly it works well enough to scare admissions out of would-be spies in government agencies. Except that all of the recent high-profile spies managed to repeatedly pass the polygraph. Even though they didn't have any training in countermeasures. Oh well.