In March 1801, just two days before the end of his term as President, John Adams appointed a few dozen Federalist Party supporters to circuit judge and justice of the peace positions. It was an attempt to block and frustrate the plans of Thomas Jefferson as the new President, whose Democratic-Republican Party was against much of the centralization of power that the Federalists had stood for.
William Marbury had been appointed Justice of the Peace for the District of Columbia by outgoing president John Adams -- one of a number of such last-minute appointments made by Adams. When Thomas Jefferson came into office as president, he directed his Secretary of State, James Madison, not to deliver many of the commission papers for appointees such as Marbury. Marbury petitioned the Supreme Court directly to hear his case, as a provision of the Judiciary Act of 1789 had made possible. The Court said that particular provision of the Judiciary Act was in conflict with Article III of the Constitution, and so they could not issue a specific ruling in Marbury's case (which they believe he should have won). Nevertheless, in making their statement about the case, the Court established the principle of judicial review.
The power of judicial review is the Supreme Court's ability to strike down a law as unconstitutional.