US Police - difference between Sheriff and City police?

As a Brit, I am puzzled as to what is the difference between the Sheriff's Dept., the US Marshals and the City Police Departments. Can any kind American pls enlighten me? Thank you!
9 answers 9