There are different types of court, but here we focus on the Federal and State court systems. Most crimes are heard in state court. These are crimes we commonly, immediately think of (probably because we hear about them the most) such as arson, theft, rape, and murder, etc. These crimes are investigated by state agents such as local police officers and county sheriffs and tried by local and state attorneys.
The crimes that go to federal court are generally ones that are in regard to some federal or national issue such as federal tax fraud or cross-state trafficking of contraband. Federal crimes are investigated by federal officers like the FBI and CIA and tried by federal attorneys. Federal court cases generally take a longer time to resolve because of its complexity.