The US Constitution squarely defines the federal government's power, including its authority to pass and enforce laws. The country's founding fathers deliberately established a system of government known as federalism that manages the balance between federal and state authority. While both the federal government and the state governments have the power to formulate criminal laws, their scope is shaped and defined by the principles of federalism.
The federal government gets its authority to create laws through Article I, Section 8, of the Constitution and is empowered in areas such as declaring war, fielding armies, minting currency, managing foreign affairs, and regulating interstate commerce. Criminal law enforced and prosecuted under federal statutes include the acts that fall under the federal government's defined authority in these areas. Examples include treason, counterfeit, felony violations of interstate commerce, and piracy or felonies committed in territorial waters.
Outside of this, the Tenth Amendment to the Constitution clearly designates the states as the primary regulatory authority for all other matters within their borders. This means that the authority to enact and enforce most criminal laws is given to the states, along with the policing power to ensure the safety, security, and prosperity of their citizenry. State laws can encompass a wide range of criminal behavior including murder, rape, robbery, theft, burglary, assault, battery, prostitution, drunk driving, littering, disorderly conduct, and disturbing the peace.
Ninety percent of all criminal laws are derived from state rather than federal governments, and these laws often vary from state to state. What is illegal in one state might be fully permissible in another. The sale and use of marijuana is but one example. (Marijuana is also deemed illegal under the federal statue regulating interstate commerce.)
In limited cases, crimes that are typically prosecuted by the state may shift to a federal jurisdiction if the federal government believes it has authority under the Constitution. For instance, murder might be tried in federal court if it involves drug trafficking, an attack on a federal branch of government, an act of terrorism, multiple killings across multiple states, or the high seas.