The United States Marshals Service (USMS) is a federal law enforcement agency within the United States Department of Justice and is the oldest federal law enforcement agency in the United States. The U.S. Marshals Service holds the broadest authority of all federal law enforcement agencies.
The USMS is the enforcement arm of the federal courts, protecting federal courts and ensuring the effective operation of the judicial system.
In the United States a sheriff is generally (but not always) the highest, usually elected, law enforcement officer of a county. The political election of a person to serve as a police leader is an almost uniquely American tradition. (The practice has been followed in the British Channel Island of Jersey since at least the 16th Century). All law enforcement officers working for the agency headed by a sheriff are called sheriff's deputies or deputy sheriffs and are so called because they are deputized by the sheriff to perform the same duties as he. (In some states, however, a Sheriff may not be a sworn officer but merely an elected official in charge of sworn officers.)
State police are a police body unique to each U.S. state, having statewide authority to conduct law enforcement activities and criminal investigations. In general, they perform functions outside the jurisdiction of the county sheriff, such as enforcing traffic laws on state highways and interstate expressways, overseeing the security of the state capitol complex, protecting the governor, training new officers for local police forces too small to operate an academy, providing technological and scientific support services, and helping to coordinate multi-jurisdictional task force activity in serious or complicated cases in those states that grant full police powers statewide. A general trend has been to bring all of these agencies under a state Department of Public Safety. Additionally they may be serve under different state departments, such as the Highway Patrol under the state Department of Transportation. Some states have both a state police and a highway patrol, such as Arkansas.
Just to add to that, some municipalities have their own police departments, e.g the LAPD, NYPD etc.
Confusing, ain't it?