Whether they are trained to spot lying or not is really an underlying issue. They use specific tactics in order to gather information . It just so happens that, in so doing, they are often able to uncover glaring fallacies.
Now of course, many officers may have a lot of experience, or innate special abilities or training (or they’re good poker players), that give them an edge when trying to sort out truth from fiction. But that’s not a universal trait.
Instead, they rely on a suspect’s big fat mouth to discover those lies. Because of this reliance, the police officer is more well trained in deception than he is at spotting it, in fact. The officer will always make an effort to strike up a conversation and get you talking. This is the first deception, lulling you into a conversation at your own will – because you don’t have to say anything to the cop – and it is almost always advisable not to. Hell, this is the reason for the whole Miranda Rights thing (you have the right to remain silent, etc.).
During these voluntary conversations, a cop will get you talking, and they will listen to specific details. They will often repeat your answers back to you. They will come back around after a few minutes and ask questions they’ve already asked, and listen for discrepancies. They will also look at basic body language while you talk, which can be a measure of honesty. And all of that aside, everything you’ve said is on record. It can and WILL be used against you.
Best policy when dealing with the police is to learn two simple statements. Firstly, “I prefer not to answer that”, (or “I prefer to stay silent”)... and “Am I being detained?”. Those two statements are really the only thing you’ll need to say to a cop. It doesn’t matter if you’re completely innocent and “have nothing to hide”. You should still enforce your rights to avoid any unforeseen trouble.
Of course, most incidents with police are minor, and there’s no reason to be rude. Be cordial and polite and remember how important safety is to the cop, so just do what you can to put the cop at ease (slow movements, hands in the open at all times, calm and sincere). That’ll go further than trying to subvert his built-in lie detector.