A federal crime is a crime that is made illegal by U.S. federal legislation, meaning that any charges will be tried in a federal courthouse and by a federal judge. Most laws that are enforced in the United States are heard on the state level because they are made illegal by state legislation.
If the Federal Government or any federal agency suspects that you may have committed a crime that violates federal statutes, then the agency responsible for investigating these types of crimes will open an investigation against your own alleged criminal actions. Depending on the nature of the alleged crimes, any number of agencies, task forces, surveillance teams, and more may take part in the investigation as they begin to build a case against you.