Discussions of our Constitution as a whole often include the phrase, "checks and balances," often accompanied by references to "separation of powers." Neither of these phrases appear as such in the Constitution, but the concepts are clear from the structure of the document and of the government it creates. See, e.g., Perez v. Mortgage Bankers Association, 575 U.S. 92 (2015). The powers in question are the powers of government as the Founders conceived them. Thus, Article I, section 1 of the Constitution reads, "All legislative Powers herein granted shall be vested in a Congress of the United States, which shall consist of a Senate and House of Representatives."
Article II, section 1 begins, "The executive Power shall be vested in a President of the United States of America."
Article III, section 1 begins, "The judicial Power of the United States, shall be vested in one supreme Court, and in such inferior Courts as the Congress may from time to time ordain and establish."
That is, the Founders saw three powers of government, legislative, or the power to make laws, executive, or the power to enforce laws, and judicial, or the power to interpret laws.
Checks and balances enter into this scheme via the observation that the Founders wanted to create a federal government that was more powerful than what they had, but still limited. They worrried that the people who exercised any of these powers might abuse them, so they defined each branch to have some power to check the other two.
Thus, Congress has the unique power to remove any official via impeachment. Nixon v. U.S., 506 U.S. 224 (1993), contains an interesting, informative explanaation of why the Founders lodged this enormous, important power "solely" with Congress. It also has the sole authority to appropriate funds for expenditure by the federal government, meaning that it can, in theory, cut off funds to any person or agency that uses its power in an unlawful or tyrannical manner. The powers are not fully separated. If they were, the system would not work. Thus, although only Congress may enact legislation, the president still has a role in that process. He may sign or veto legislation Congress passes, although Congress always has the final say, with the power to override a veto by the president, which means that the legislation becomes law in spite of the veto. A specific power of the president, "by and with the advice and consent of the Senate," is to make treaties, and appoint ambassadors and federal judges, from justices of the Supreme Court down. Thus, the executive has the power to check the legislature and the legislature has the power to check the executive.
Informed observers often call the judiciary the "least dangerous branch," for several reasons. It has no power to appropriate funds. It has no power over military decisions, except to review the actions of the legislature and the executive as they exercise their designated powers with respect to the military (Congress, or the legislature, has the power to declare war, and the executive is commander in chief of the armed forces).
Perhaps most importantly, judges only take cases that parties bring to them. The legislative and executive are roving, always looking out for issues to address. The power of the federal courts, in contrast, "shall extend to all Cases, in Law and Equity, arising under this Constitution, the Laws of the United States, and Treaties made, or which shall be made, under their Authority;..." That paragraph later refers to "controversies," and the federal courts take that language very literally, only hearing cases that meet the Supreme Court's definition of "cases and controversies.'
The courts use the term "standing" to denote the threshold one must pass in order to get them to hear your case. If you lack standing, the court will immediately dismiss your case. For some time, the lodestar case (the most important case for deciding a legal rule or issue) for deteremining standing has been Lujan v. Defenders of Wildlife, 504 U.S. 555 (1992), where the court provides a detailed discussion of the issue. They rely on the "cases and controversies" language in Article III to decide whether a plaintiff has standing. The courts derive their power from the fact that, as Chief Justice John Marshall pointed out in the famous case, Marbury v Madison, 5 U.S. 137 (1803):
"if a law be in opposition to the constitution; if both the law and the constitution apply to a particular case, so that the court must either decide that case conformably to the law, disregarding the constitution; or conformably to the constitution, disregarding the law; the court must determine which of these conflicting rules governs the case. This is of the very essence of judicial duty.
If, then, the courts are to regard the constitution, and the constitution is superior to any ordinary act of the legislature, the constitution, and not such ordinary act, must govern the case to which they both apply." At 178.
Two parties who disagree bring a case to court. They will most likely disagree about what law applies to the case and how. The job of the judge is to decide those issues. Where the Constitution applies, it must take precedence over all other law, or it is not really a constitution. Our Constitution says that it is "the supreme law of the land." It doesn't hurt to say so, but this must be true of any constitution, which is a plan of government that enables all other acts of government.
So federal judges have the job of evaluating any law of any sort, legislation, agency rule, executive order, no matter the source or type, that would have the effect of constraining anyone's behavior for its consistency with the Constitution, and holding that law unenforceable if it violates the Constitution.
This is an enormous power. It is inherent in the concept of a constitution that empowers judges to decide legal disputes. It is how the judicial power checks the legislative and executive powers. The legislative and executive check the judicial power by controlling who becomes a federal judge and by determining the jurisdiction of the courts. Congress can decide to forbid federal judges from hearing cases involving specific legal issues. This rarely occurs.
Federal judges are unique in our system in that our Constitution deliberately insulates them from political pressure by giving them their positions "on good behavior," meaning that the only way to remove one is to show criminal conduct through the impeachment process. The Constitution also forbids Congress from reducing their salaries during their term in office.
This is a classic case of our Constitution addressing an issue that the Founders had with British colonial government. Under the British system at the time, judges all worked for the monarch and were thus prone to deciding cases the way the monarch wanted, rather than according to the written law. Protecting federal judges from political pressure is the obvious way to avoid this problem.
As Justice Marshall put the point in Marbury v. Madison, at 163:
"The government of the United States has been emphatically termed a government of laws, and not of men. It will certainly cease to deserve this high appellation, if the laws furnish no remedy for the violation of a vested legal right."
Rights are laws that constrain government. They forbid government from taking certain actions against anyone, such as punishing speech or religious belief and practice, or from entering a private space without a warrant. Such rules are meaningless if no one ennforces them. Enforcing them is the job of judges, especially federal judges.
It is an interesting and important feature of our system of government that we employ people who have as part of their duties, when they see fit, to stop government from acting. Our government is supposed to be powerful, but limited.