The facts of the case of McCullough v. Maryland (1819) are fairly straightforward. The state of Maryland taxed the Second Bank of the United States, believing it to represent unfair competition to its own banking institutions. Hostility towards federal banking was widespread in the South, as federal banks were held to be instruments of control in the hands of the wealthy political and banking elite of the East Coast. Imposing large taxes on branches of the Second Bank, as the state of Maryland sought to do, was an attempt to ensure that federal banks would not drive state banks out of business.
However, Maryland's tax soon ran into trouble after the cashier of the Baltimore branch of the Second Bank, James McCullough, refused to pay up. The case eventually wound up at the Supreme Court, where the state of Maryland argued that, as a sovereign state, it had the authority to impose taxes operating within its borders, including branches of the Second Bank of the United States.
Yet in a unanimous decision, the court ruled against the state of Maryland. It held that no state had the right to tax a national bank. A power to tax is also a power to destroy, and so any tax imposed upon a Second Bank could easily be increased so as to wreck the whole project of a federal bank.
More importantly, the court ruled that Congress had implied powers under the so-called “Necessary and Proper” clause of article I, section 8 of the Constitution. Such powers, though not explicitly set out—hence their being implied—were nonetheless valid as they were needed to further those objectives covered by the explicit powers.
So, for instance, Congress had the explicit power to borrow money and collect taxes. And the setting up of a Second Bank, ruled the Supreme Court, was an example of Congress making “all laws necessary and proper” to carry out these specific powers conferred on Congress by article I, section 8 of the Constitution.