Alright, so this has been a bit of a point of confusion...well, more uncertainty for me. How does membership within the E.U. differ from a state of the United States belonging to the federal government of the U.S., aside from the fact that statehood is permanent and E.U. members can still opt out and leave if they wish? I honestly don't know much about how a country being a member of the E.U. works or retains its autonomy, and I must confess despite my knowledge of U.S. law, my knowledge of international law is more than a bit fuzzy. And from what I've gathered, even for people who are knowledgeable of such things, the E.U. and the laws pertaining to its member nations is in and of itself an extremely complicated set of affairs. And while many states of the United States are comparable to individual E.U. countries in terms of size, population and economies, it's obvious that they are completely different in terms of government.
As for the U.S., the states are all obviously united under the federal government (hence the name), and the laws and principals spelled out in the Constitution are the law of the land no matter what state you're in. However, there is a LOT the Constitution doesn't cover - it basically provides the skeleton for how the government as a whole works, and lays out what rights and laws will hold true no matter which state you're in, and it's not a very long or complicated document. You can (and if you're an American, you SHOULD) read through the entire Constitution in less than thirty minutes without skimming or skipping it.
Everything else is left to the states, who do operate and tax pretty much on their own. Different states will have different rules or laws in regard to traffic, how individual criminal procedures and violations are handled, family law, etc. And even within states, individual counties can have their own laws and regulations; for example, there are still some counties in the United States (known as "dry counties") where it is illegal to sell or purchase alcohol despite national Prohibition being lifted long ago. However, states are not allowed to have their own foreign policy or trade agreements, their own army, etc. International affairs are the domain of the Federal government, as are basically any matters or laws that affect more than one state. As for U.S. territories...I honestly don't know how much autonomy they have; I only know that they are still technically their own countries, but they still belong to the U.S. and while they do have a fair amount of autonomy, it is still limited.
Knowing all this, how does an E.U. member work in relation to the E.U. versus how a U.S. state work in relation to the U.S.? And please, no nation-bashing. This is a sincere question about how governing works, not a debate of which countries are better than which.