Federalism is the system in which the power to govern is shared between the different levels of government. Basically, there are at least two different levels of government in an established territory, and these different levels govern through power granted to them in a constitution. The central government is the highest of these levels and, despite the many different forms of federal governments worldwide, they're almost always responsible for two things; national security and diplomacy.
Okay, now how does it apply to the USA?
Glad you asked.
Even before the Revolutionary War was over, the Thirteen Colonies realized they needed some form of national government to replace the British that they were throwing out. Thus, first and foremost, each colony decided to call itself a state (or commonwealth, which is pretty much the same thing), which then agreed to form a national government that would look after the stuff that transcended any individual state's ability to control, like foreign policy and national defense. In 1781, they created the Articles of Confederation to create such a government.
However, the last thing anyone wanted at this point was a powerful national government; that was seen as a stepping stone to another British-style tyranny. So the writers of the Articles deliberately made the national government weak and protected the states. This was nearly the nation's undoing. The government could not collect taxes, which meant that it had to raise money by asking the states politely; consequently it had barely enough money to perform the basic functions of government (and sometimes not even that). It also couldn't coerce states or regulate commerce, which often led to conflict between the states putting up tariffs between each other, resulting in hardship in all states. (Most scholars say this more than anything else made it necessary — a good portion of the Constitution is written to make interstate tariffs impossible.) The final straw for the Articles of Confederation was Shays' Rebellion in western Massachusetts in 1786–87, which state militia had to break up due to the ineffectual response by the national government.
So they got back together and wrote up the Constitution of the United States, which was ratified in 1789. Since no one, in the words of Gandalf, likes to share power, the Constitution sets up a generally "federal" form of government. This means that the states have power over stuff in their state and the national government has power only over national issues, like trade between states, national defense, foreign policy, and so on.
It should be noted that prior to the Federalist Papers (check them out on Wikipedia if you feel like doing research; otherwise, know that some people didn't want the Constitution to be ratified so guys like James Madison who helped to create it wrote letters to the editor to convince them that it was a good thing), the term "federal" was more closely associated with federations (as in the) than republics. This means that proponents of the Constitution gave themselves an inaccurate name because it sounded positive instead of negative (i.e., the original false advertisement in the United States).
(Because the USA has a federal system of government, the term "federal government" has come to mean the national government, which is a rather inaccurate name, but it is very important to realize that 99% of the time, when someone says "federal" they mean "national". Just go with the flow and assume that "federal" means "national" unless said otherwise.)
What does this mean?
Again, glad you asked. In any republic, the power comes from the people, at least in theory. But in a federation, this power is granted directly by the people to both the central government and the lower levels (i.e. states); and in a confederation, this power goes to the lower levels or states which then grant some of it to the central government. (A grant of power direct to the central government which then delegates it to the lower levels is characteristic of unitary or devolved states like France and Italy.)
After the Constitution was ratified and up until the Civil War, it was fairly unclear what the American government actually was. For the first 80 years or so, this worked out fine: the states allowed the federal government to do its thing, but made sure that everyone knew they held the real power. But because the Constitution left it mightily unclear exactly how much power the states still had, people (especially in the South and New England) tended to associate with their state first and nation second, and the central government and state governments bumped up against each other frequently.
Then there was a disagreement over whether new states added in the West should be free or slave states. First was the Missouri Compromise, which banned slavery in latitudes north of 36°30'N (commonly and wrongly referred to as the Mason-Dixon Line, which is actually the border between Pennsylvania and Maryland). Then there was the Wilmot Proviso, which tried to ban slavery in any territories acquired from Mexico (and died in Congress). And then came the Compromise of 1850 and the Kansas-Nebraska Act, which allowed territories to vote on the matter, and led to shooting wars in Kansas. After that, the Dred Scott v. Sandford (60 U.S. 393 (1857)) decision made territorial bans on slavery unenforceable, and the Republicans won the elections in 1860 on a platform of banning slavery in the territories on a federal level. Some of the southern states decided that this was a breach of agreement between state and national government, because the federal government should (in theory) only have the power that they gave it, and they sure didn't think they had given Uncle Sam that. The South, thus feeling put-upon, said, "Screw you, we make our own rules." The result was The American Civil War, in which it was proved that the federal government had the military might to make anyone do what they wanted — including individual states, which, up until then, had held the real power.
The important, relevant things to remember here are (A) the federal government gained power and defined itself as NOT a confederacy, and (B) prior to the Civil War, it was the United States plural; after, it was a singular noun. (You don't hear people refer to "these United States of America" anymore.)
What does this mean today?
The Constitution lays out how the laws and power are divided between the states and the federal government. However, the United States Supreme Court told the rest of the nation that it would handle deciding exactly what the Constitution means and exactly what power the states and what power the federal government really has (Marbury v. Madison, 5 U.S. (1 Cranch) 137 (1803), if you care). So, if the federal government decides to pass a law, or do some action, and the states don't like it, everyone goes to the Supreme Court and it decides who wins.
Officially, the Constitution says the federal government has jurisdiction over commerce between states (the Commerce Clause), commerce between states and foreign lands, foreign policy, the national military, making paper money and coins, and stuff like that.
As of the 21st century, the federal government has jurisdiction over anything it wants. How do they legitimize this?
- The first way is by Spending Power: the carrot of federal funding and the stick of withholding it. In other words, the feds can't make a state do what they want; that's beyond the scope of their power. But any state that does do what the feds want gets a couple billion dollars. Any and all states are of course free to go their own way, and the federal government is certain that said state's citizens won't mind getting their taxes raised to 90% to make up for funds that state is no longer receiving from Washington, D.C. For instance, the age limit on alcohol (21+ years) was forced on the states by withholding 5% of highway infrastructure funding from states that wouldn't.
- There has been pushback on this in The New '10s. The Affordable Care Act (A.K.A. "Obamacare") told all the states to expand their Medicaid programs by a certain amount or else they'd lose all their federal Medicaid funding. The Supreme Court decided that the feds had finally gone too far with this Spending Power thing, because the law was essentially forcing the states to expand Medicaid whether they liked it or not (though it should be noted that the feds planned to pay for 90% of the expansion costs). After all, it would be political suicide for any state politician to do something that would nix all that Medicaid funding. So the court decided that the states had the right to opt out of the expansion and keep their current level of funding, regardless of what the law said. Legal experts are wondering just how far the Court will go with this line of thought, and whether it will apply to areas other than healthcare.
- The second is by the Commerce Clause. The Commerce Clause in the Constitution, which officially lets Congress regulate interstate commerce only, has been interpreted by the courts so that just about anything is interstate commerce. This dates back to at least the 1942 court decision Wickard v. Filburn, which ruled that a farmer growing wheat solely for his own consumption is affecting interstate commerce and subject to Federal regulation. The use of this is particularly controversial and has remained so for decades. There was a high-profile case in the 21st century; Gonzales v. Raich in 2005 ruled that personal use and cultivation of controlled substances such as cannabis likewise can be subject to Federal regulation, even if it was not going to cross state lines.
- There are some limits on both of these decisions, but they are vague and usually can be gotten around with clever drafting showing the bill to be part of the proper use of the Commerce clause. Wickard, for instance, was a dairy farmer who grew 25 tons of wheat rather than pay the controlled price of wheat for his dairy farm, which was also regulated by federal law. Gonzales, on the other hand, was considered to be affecting what was necessary to be able to actually enforce their proper commerce power of regulation of drugs. However, some people feel the logic gets very tortured quickly and grants the Federal Government a general police power, which it is explicitly not given. A prime example of the "tortured logic" is poor Chief Justice William Rehnquist's decision in United States v. Lopez, wherein Rehnquist goes over the past 60 years of Commerce Clause rulings, trying to incorporate them into a coherent whole. He came up with the somewhat questionable ruling that all the subjects of the Commerce Clause had, hitherto, dealt with "economic matters," and that since gun control in school zones was not inherently related to economic matters, this was unconstitutional. Congress quickly decided to limit the Gun-Free School Zones act to guns that had arrived via interstate commerce — which is virtually all guns, since most guns are produced outside of the state in which they are purchased, and even if they are purchased in the state of manufacture, most are also made out of materials that had crossed state lines.
- The Supreme Court also ruled that the Commerce Clause cannot be used to compel commerce (i.e. Congress can't make a law that requires someone to buy a particular item). This was a major issue of the ACA decision, as those against it argued that mandating someone buy healthcare was compelling commerce, whereas those for it argued that it was a valid use of the commerce clause (and above all else, that it wasn't a tax). The Supreme Court's decision struck down the use of the Commerce Clause as a defense, but did note that the law as written was a tax despite not using the dreaded "T" word, which allowed the law to stand because Congress does have the power to levy taxes.
- If you want a simple version, however, you can understand the Commerce Clause as this: the Commerce Clause is an old-fashioned way of saying "Congress shall have the power to regulate the national economy." The arguments are about what the "national economy" is and what it means to "regulate" it.
- The third is through the Necessary and Proper Clause in the Constitution, which is also called the "elastic clause". This clause says that Congress can make any law that will help it do its job better, i.e., what is necessary and proper. This clause has to be paired with another clause to back it up, because otherwise it would basically be a carte blanche for Congress. Many of the big important laws passed (the Civil Rights Act of 1964, for example) were justified through the Necessary and Proper Clause paired with the Interstate Commerce Clause.note
- The fourth, often used in conjunction with the elastic clause, is the Preamble. "... in Order to form a more perfect Union, establish Justice, insure domestic Tranquility, provide for the common defence, promote the general Welfare, and secure the Blessings of Liberty to ourselves and our Posterity..." are some pretty broad statements that can be used to justify a lot.
Federal power has been in ascendancy over states' rights since the Civil War (and "states' rights" has been used time and again as a rallying cry of the oppressor, which really doesn't help the cause), but sometimes states get uppity and decide to thumb the feds in the eye. This can be seen on both sides of the recently concluded same-sex marriage issue; Hawaiʻi started the whole thing off by issuing marriage licenses against federal will, and Alabama ended it by refusing to issue them after the feds had shifted position and decided they should. Conflicts of this sort tend to end up in the Supreme Court, which is after all what they're there for. For an example that isn't about civil rights, one can look at the marijuana legalization laws in Colorado and Oregon, which are blatant defiance of federal law. Either the feds secretly approve, think it would be politically unwise to pick that fight, or just don't care enough to make the effort (likely a combination of all three), so the laws are not being challenged.
Still, most police and laws are based on the state level, and most criminals are handled by state courts. The federal government just steps in at various points, handling stuff with a national interest, while not bothering with petty crime. An interesting exception, and one that illustrates the dynamics of federalism, was Project Exile, which used federal authority over crime involving guns as a deterrent. In Project Exile communities, the Feds would actively prosecute any gun crimes rather than the state, which would put the convict into the federal prison system, allowing the government to send them across the country from their home community — hence the name.
A major problem with all this is that to the average citizen, America isn't one nation, but 51 (50 states and D.C., plus territories), because crossing a state line almost is like entering another country. Each state's laws are different. This is most easily seen with gun laws, but it affects far more than that. For example, despite the "Americans are all Cowboys/Gun Nuts" stereotype, traffic laws are more likely to get the average US citizen in trouble... Can I make a right turn on a red light or not?note Are U-turns permitted at all, and if so under what circumstances? If the speed limit on a surface street isn't explicitly posted, what is the speed limit?
Some states attempt to mitigate this by creating "uniform acts", areas of the law that the states agree will be the same in each state. The most influential of them tend to be business related, since money talks and companies want to do business in every state they can profitably. The Uniform Commercial Code (UCC) is the longest and most elaborate of the uniform acts, and also the most widely-adopted (along with the Uniform Partnership Act which covers business partnerships). A state may adopt a uniform act as written, or a state may adopt it with specific changes. The UCC is a prime example of this: 49 states have the UCC more or less without changes, while one state, Louisiana, adopted the UCC minus Article 2 (Sale of Goods), because they wanted to keep their existing system (based on French law) instead. States can also choose not to adopt them at all; the Model Penal Code, an attempt to create a uniform act for criminal law, has notoriously spotty acceptance (only a few states use it in its entirety, with most states that apply it using "MPC-inspired" variations, and many states completely ignoring it for their own codifications — or in a few cases, most notably those of Michigan and Maryland, non-codificationsnote ). More typically, a model or uniform act's adoption will resemble the Model Business Corporation Act, being adopted by a large chunk of states (the MBCA has 24 states), "inspiring" a number of others, and being completely ignored by the rest, particularly those with contentious politics or a vested interest in the status quo (for instance, as respects the MBCA, the single most important state for corporate law is Delaware, which has explicitly rejected the MBCA for its homegrown statute specially tailored to the needs of its major customers — large public corporations).
Crossing a state line also means that in addition to the laws of each state you were in, the national government puts more restrictions on what you can do, because they can now regulate your actions as "interstate".
All in all, between the national, state, county (in most places), city (in some places) and village laws, you can't turn around without having to obey thousands of laws, rules, and regulations by several different layers of government, each layer requiring more officials and bureaucracy and money (taxes) to create, administer, govern, and elect (or appoint) people to do so.
It can be argued, though, that the layers of government were originally put in place to benefit and protect the people; and that, given the actual definition of the word "state" (an independent political entity that answers to no higher authority) and the efforts of the framers of the Constitution put into preserving at least some of this definition, it is Congress' duty to preserve the "tiers".
...BUT the one thing that cannot be disputed is that there is no easy answer and that any author is sure to have fun with all the emotion tied up in politics.