To know whether or not someone is lying usually requires spending time with them and observing their "telltale signs" over time. An example might be nervous laughter or sheepish grin.
Some folks occasionally "test people" by asking questions they already know the truth about to see if the person is honest.
Once they "catch them in a lie" they know what to look for.
Aside from that there are (general) things people have come to look for such as avoiding eye contact, rapidly answering and shifting the conversation topic, dating eyes, sudden change in breathing pattern, licking lips, answering a question with a question, becoming defensive, angry, or argumentative.
Last but not least sometimes it just comes down to gut instincts. Sometimes you have to decide if you (trust your feelings)/logic.