Idioms are literary devices and expression used to portray thoughts and ideas in a stylized and interesting, yet, non-literal manner. In the given sentence, the policeman is not implying that he literally "lay down the law". By "lay down the law" he means he had to take action and enforce the law. Another example of an idiom is the expression "under the weather". When someone says they are "under the weather", the meaning is not literal, what they actually mean is that they are sick or unwell.