A police officer can enforce a law. Because they are the one who seen not all but the other activities in the society. That they can enforce it according to the crime committed by a perpetrator....
That is a WIDE-ranging question. There are MANY laws. Some are criminal law the violation of which carries jail or prison penalties. Others are 'civil' laws the violation of which may not carry...