Subject-matter jurisdiction refers to the court's authority to decide a particular case. Within most justice systems, certain courts are delegated certain jobs and are vested with the right only to hear and decide certain disputes and to preside over certain parties. Thus, in order to hear a case, a court must have both subject-matter jurisdiction and personal jurisdiction.
Within the United States, separation of powers rules dictate that federal courts have only those powers enumerated in the Constitution. This means that federal courts have subject-matter jurisdiction only over cases arising from federal laws. The federal rules of civil procedure also mandate that a federal court can have subject-matter jurisdiction over cases where diversity jurisdiction exists.
Cases that arise from federal laws include those cases where the cause of action is based on the Constitution, and those cases where the grounds for the lawsuit are based on a federal statute or federal judicial decision. Diversity jurisdiction, on the other hand, vests subject-matter jurisdiction in the federal court on any issue in which the amount in controversy is more than $10,000 US Dollars (USD) and in which the parties having the dispute are from different states.
The reasoning behind subject-matter jurisdiction is that the court with the greatest interest in deciding the dispute should be the court that has the opportunity to make a ruling on it. So, for example, since federal courts do not have a great interest in deciding how property disputes are settled in each given state, federal courts do not have jurisdiction over such issue and the authority is vested in state courts instead.
Because of separation of powers rules, most federal courts are courts of limited jurisdiction. Most state courts, on the other hand, are courts of general jurisdiction. This means the state courts have subject-matter jurisdiction over many issues. State courts can decide any cases arising out of state law, and even some cases arising out of federal law, as long as the federal courts don't have the exclusive authority on the issue.
Other courts of limited jurisdiction also exist. For example, bankruptcy courts have jurisdiction only over bankruptcy cases, tax courts have jurisdiction only over tax cases, family courts have jurisdiction only over family law cases, and small claims courts have jurisdiction only over cases in which a small amount of money is at stake. This means that a bankruptcy court would not have subject-matter jurisdiction over a criminal law issue, since the bankruptcy court does not have a vested interest or authority to decide such a case.