It will depend on the type of police force. In the case of a state police, it would be a combination of the state legislature and state judiciary. The real answer is surely lengthy and complicated, but suffice to say the mayor (thankfully) does not control the police... just as thankfully the president does not control the military.