What's the difference between a sheriff's office and a police department?

The main difference is the area of jurisdiction. A sheriff's office provides law enforcement services and/or jail services for a county or other civil subdivision of a state. A police department serves a specific municipality, city, town or village. Often, cities contract for law enforcement services with the county sheriff's office.