While police officers have broad powers because of their official status, they are not given carte blanche to do whatever they want in all situations. There are situations in which they can be criminally liable for their misconduct. These range from fairly petty crimes to very serious ones.
An example of a petty crime that can still land an officer in trouble is the misuse of power and influence. For example, there was a recent scandal in the New York Police Department over the practice of “fixing” parking tickets. Officers would abuse their powers by getting parking tickets quashed as favors to their friends or relatives. When done on a large enough scale, this can result in criminal charges, as seen in this link.
On the other end of the scale, there is murder. Police officers sometimes need to kill in the line of duty. However, they can be held accountable when they kill in circumstances that are not part of their jobs. A well-known example of this is the killing of two people and the wounding of four others by officers from the New Orleans Police Department in the aftermath of Hurricane Katrina. They were found to have illegally shot the people and then of having covered up the evidence of what they had done.