Sheriff's represent the county, while Police departments represent a city. Transfers, arrests, or other matters that occur at the county level will be conduncted by the sheriff's department. Anything at the city level will be handled by the city's police department. Some jails are city, some are county, some are state, some are federal, and others are military. Transferring between levels will be handled by either the in-coming or out-going juridiction.
BTW, I am guessing at all this.
Whatever you do, don't shoot the sheriff...or the deputy.