The field of law enforcement has branches that oversee a range of jurisdictions, all with a common purpose: to protect citizens and enforce the laws passed by legislators at the local, state and federal level of government. Depending on where you're at, and what you're doing, different types of law enforcement agents may take an interest in your activities.
Local Law Enforcement
The most common and visible law enforcement officials are the municipal police officers representing cities, villages and townships. The main difference between these officers and those at the state or federal level is they are the initial enforcement front for all criminal laws. With chiefs who are usually appointed by the mayor but sometimes elected to office, these officers' efforts are bolstered by a range of support staffers, from detectives to dispatchers to jailers, who protect citizens and enforce laws passed at all levels of government. Their activities are generally limited to the jurisdiction they're assigned to, as opposed to officers at the state or federal level.
State Law Enforcement
Though often based in and elected by county voters in most American states, sheriffs and their deputies are often responsible for patrolling an area's state and federal routes, as well as its unincorporated or unpoliced municipalities. These officers, like municipal police, often find themselves enforcing local, state or federal laws on the front lines. Many states have highway patrol and/or state police officers, too, who commonly are found along highways enforcing state traffic, criminal or civil laws. State drug task forces, executive departments such as attorneys general or taxation, even state parks agencies employ law enforcement agents to engage in more specialized enforcement efforts. Officers in state prisons also are considered part of each state's law enforcement efforts, different from the others in that they're enforcing state laws within the confines of a state institution.
Federal Law Enforcement
The federal government employs various types of law enforcement agents, all enforcing laws and policies established at the highest level of government. These include special agents and support staff for agencies including the Federal Bureau of Investigation, Drug Enforcement Agency and Bureau of Alcohol, Tobacco, Firearms and Explosives, but also involve oversight by several others, ranging from the Internal Revenue Service to the Bureau of Indian Affairs. They don't enforce local or state laws, but would be apt to tip off the correct local or state authorities when suspect activity is spotted. Federal prosecutors often coordinate the efforts of agents from several agencies at once to build cases and prosecute federal crimes.
Where the Court Lies
Officers at different levels of law enforcement interact and share information and testimony in a range of cases. Local officials will enforce all levels of law, but the courthouse or adjudicating authority that prosecutes and punishes alleged violators will depend on the type of law or policy that's been broken. Many local laws that are broken at the misdemeanor level are handled at the local level. For instance, many Ohio municipalities have mayor's courts that punish minor misdemeanor offenses, then collect the fines. More serious crimes are often handled by municipal court judges prosecuting serious misdemeanors and some felonies. A county or state circuit courthouse will prosecute even more serious crimes, using state statutes. Federal court districts, with prosecutors based in each, handle the federal crimes.