Getting to know the Polygraph Test

Why do people use lie detector tests? Is it because they are trying to catch a bad guy like in those action movies where they force a suspect to undergo a lie detector test? Or maybe it’s because you are accusing your partner of cheating…