system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: Law enforcement hierarchy in the states

I'm from the UK and here it's pretty simple, the country (England) is divided into counties, and there is a police force for each county, that all enforce the same laws nationwide. Within the police forces there are specialized divisions such as drugs squads and firearms units, but I know there are many different types of law enforcement in the US Such as: Police, Sheriffs, State Troopers, FBI, DEA, Marshals and so on... 
But what are the differences between all these organizations, Who has more power and where? Do sheriffs have more power/jurisdiction over police? Do state troopers have jurisdiction over sheriffs? Do they all have different jobs and what are their purposes? 

Thanks in advance.
gpt
There are two main important sources of law: the federal government and the states. The federal government and each state separately have criminal laws, for example, with some overlap. (For the most part, federal crimes are quite serious.) Federal law is enforced only be federal agencies; they are the only ones with jurisdiction. The main federal law enforcement agency is the Federal Bureau of Investigation, but other law enforcement agencies like the DEA, ATF, ICE, National Park Service rangers, and so on are tasked with enforcing law in a particular place (e.g. CBP at the border) or on a particular topic (e.g. the DEA on drugs). The U.S. Marshals mainly go after fugitives and ensure operation of the judiciary, such as by enforcing writs.

The states are divided into counties, and each county usually has its own police department. These have jurisdiction only within their own county, but enforce state law. The state troopers have jurisdiction across the state, and mainly act as a highway patrol in most places. The title of "sheriff" varies--in some towns he is the head of local police, but in others he is more like the U.S. Marshals, enforcing court orders; in some places he does both.

City and county governments also make laws, but they are normally minor, such as prohibiting loitering or smoking in public. Local police departments enforce this provisions.

In a nutshell: federal and state law enforcement are quite separate, and enforce different laws. The state laws are mostly enforced by local police departments, restricted to one county in jurisdiction, as well as by state troopers who can go everywhere. A slew of different agencies exist for enforcing particular aspects of law, but usually their legal jurisdiction extends beyond that subject.