Easy
Local crimes, local government takes care of it
County crimes, county government takes care of it
State crimes, States take care of it
Federal Crimes, Federal (Country) government takes care of it.
There are one exception there, if a state crime occurs within more than a state, Federal takes over, sometimes state and federal work together, depends on the case. For instance if a suspect murdered somebody here in New York, and drive down to Ohio and got busted, that is when Federal government step in, but state can either continue prosecute OR let Federal government deal with themselves.
FBI, do work with state but do not prosecute criminals if its only state law, and the suspect didn't cross the state line.
What sort of crime require FBI or police.Who out ranks cops or FbI.