Citizenship in a U.S. state is governed primarily by the first sentence of Section 1 of the 14th Amendment to the United States Constitution, which states (emphasis added):
All persons born or naturalized in the United States, and subject to
the jurisdiction thereof, are citizens of the United States and of
the State wherein they reside.
So, in the case of a natural person who is a U.S. citizen, the state in which you are domiciled is the state in which you are a citizen.
The clause also says nothing about loss of state citizenship. Again,
is it up to each individual state when citizenship is lost, or does it
always happen automatically when a citizen takes up residence in a new
state? I'm particularly interested to know whether it's possible for a
person to hold multiple state citizenships simultaneously, and whether
it's possible for a person to retain their state citizenship if they
move to a new country (as opposed to moving to a new state within the
US).
The notion of domicile or residence is singular in the case of a natural person. When you become a resident of a new state, you cease to be a resident of the old state, unless some other specific law applies. It is not generally possible for a natural person to hold multiple state citizenships simultaneous (in theory), and if a person is domiciled outside any U.S. state (e.g. if they are domiciled in the District of Columbia, Puerto Rico, the U.S. Virgin Islands, Guam, or France), they are not a citizen of any U.S. state.
Common law domicile, which is relevant for constitutional law purposes, can be changes in a single day, not particular period of residence is required. If you leave your home in say, Georgia, and move into an apartment in say, Ohio with an intent to remain in Ohio indefinitely, your domicile switches to an Ohio domicile immediately.
Common law domicile is generally what would control for diversity of citizenship jurisdiction purposes under 28 U.S. Code § 1332 and Article III of the United States Constitution. However, even though the U.S. Constitution clearly authorizes Congress to extent diversity of citizenship jurisdiction granting access to the federal courts to every lawsuit to which a non-U.S. citizen that resides in a state and a U.S. citizen that resides in a state, I do not know from memory if 28 U.S. Code § 1332 has been interpreted to have that effect in cases where the amount in controversy exceeds the statutory required $75,000, or if instead, a lawsuit between a non-citizens who reside in the same state as a U.S. citizen resident of a state is not subject to diversity jurisdiction in federal court pursuant to 28 U.S. Code § 1332 (diversity jurisdiction is concurred and not exclusive, so if someone tries a case in state court when diversity jurisdiction would have been available without trying to remove it to federal court, the state court still has full jurisdiction over the case).
This said, some state and local laws, and even some federal laws, create rights and obligations that arise from residency defined in a manner other than the constitutionally provided notion of state citizenship under Section 1 of the 14th Amendment, and there is both state and federal law governing the deemed citizenship of legal persons other than "natural persons" such as corporations and partnerships.
For example, under the Uniform Child Custody Jurisdiction Act (a model law enacted as state law in every U.S. state) and Parental Kidnapping Protection Act, and a treaty governing international child custody cases, for purposes of child custody jurisdiction there is a definition of a concept called the "home state" of a child, which differs materially from the common law definition of the domicile of a child which previously informed jurisdiction in child custody cases. The statutory definitions aren't identical, but basically look back about six months from the present, rather than looking at the current instant only, to determine where a child resides for purposes of child custody jurisdiction.
Under state and federal law respectively, there are certain changes in de facto place of residence that do not change legal domicile for purposes of eligibility to vote in federal, state, and local elections. Soldiers deployed away from the military base that is established as their home, e.g., in a foreign war or military base, remain citizens of the state where their home is even though they don't reside there on a day to day basis.
Students living in dormitories away from their parents' home only sometimes acquire a domicile and citizenship in the state where their dormitory is located - almost never in the case of an economically dependent minor present in another state with parental permission, and mostly based upon the subjective intent of the student in the case of a college student.
Usually, prison inmates continue to be citizens of the state where they were domiciled at the time they were sentenced, even if they are housed in another state on a contract basis, or are convicted of a crime in a state where they did not reside at the time.
Historically, married women were, as a matter of law, deemed to be domiciled and to be state citizens of the state where her husband resided, but that rule has been abrogated. Now, the state citizenship and state of residence of married women is determined independently of the state citizenship and state of residence of her spouse.
Despite the common law rule, states have rather elaborate operational definitions of state residence for different purposes.
For voting in state and local elections, a residency period of thirty-days or so has been tolerated as a historical administrative necessity. Similarly state residency periods for eligibility to get divorced in a state are similar.
State residency rules for purposes of in-state tuition, hunting and fishing license fees, park entrance fees, and the like, vary considerably, and the U.S. Supreme Court has largely chosen to rule that the privileges and immunities clauses of the U.S. Constitution and the 14th Amendment do not apply to these cases.
The privileges and immunities clauses became mostly a dead letter in U.S. Constitutional law as a result of the Slaughterhouse Cases, 83 US 36 (1873), in which judges seeking to limit the effect of the 13th and 14th Amendments passed in the wake of the U.S. Civil War interpreted them in a manner that gave them only a narrow effect.
And, unlike Plessy v. Ferguson, the U.S. Supreme Court ruling that authorized the segregated Jim Crow regime in the former slave states until it was overruled by Brown v. Board of Education, the Slaughterhouse Cases largely remain good law.
It is largely because of a line of cases that started with the Slaugherhouse Cases that very few rights and duties are defined as incident to either United States citizenship or state citizenship, rather than to state defined residency for a particular purpose or being a "person", which, in turn, has made state citizenship such a limited concept that many civically well educated people do not even know that it exists.
The Slaughterhouse cases also caused the federal constitutional individual rights jurisprudence that incorporates these rights against state and local governments to develop mostly under the due process and equal protection clauses of the 14th Amendment, rather than its privileges and immunities protections.
States are not permitted to limit admission to a licensed profession or occupation in the state to state residents only under the privileges and immunities clause, but can somewhat vary the rules that apply to state residents v. people who are not state residents.
For state income tax purposes, a majority of nights residing in a state normally controls in a simple two-state case. Some states are in interstate compacts (i.e. Congressionally approved interstate treaties) with each other about how income is allocated when a person resides in multiple states during the course of a tax year.
But the wording doesn't preclude the possibility of state citizenship
being acquired by other means. Are there any other circumstances under
which state citizenship may be acquired? Is it up to each individual
state, or are there federal laws that come into play? Even if it's up
to each individual state, do most of them at least apply the same
general rules?
Many state and local government afford privileges usually only afforded to state citizens to state residents who are not U.S. citizens. This case include, most famously in the case of New York City local elections and in elections to special districts where property owners are entitled to vote, a right to vote in local elections that is afforded to people who are not U.S. citizens (federal law prohibits this in federal elections).
Sometimes this is in the discretion of the state or local government. But, since immigration and naturalization law is vested solely and exclusive in the federal government under the U.S. Constitution, there are many circumstances in which non-citizen residents of a state or local government must be treated identically to citizen residents of a state or local government outside the few areas where federal immigration laws authorize a distinction and outside of the few areas where the benefits or privilege or obligation is expressly tied to citizenship as opposed to residency (e.g. jury duty).
Footnote on the Slaughterhouse Cases
The following summary is from the link above:
Facts of the case
Louisiana passed a law that restricted slaughterhouse operations in
New Orleans to a single corporation. Pursuant to the law, the Crescent
City Live-stock Landing and Slaughter-House Company received a charter
to run a slaughterhouse downstream from the city. No other areas
around the city were permitted for slaughtering animals over the next
25 years, and existing slaughterhouses would be closed. A group of
butchers argued that they would lose their right to practice their
trade and earn a livelihood under the monopoly. Specifically, they
argued the monopoly created involuntary servitude in violation of the
Thirteenth Amendment, and abridged privileges or immunities, denied
equal protection of the laws, and deprived them of liberty and
property without due process of law in violation of the Fourteenth
Amendment.
Question
Did the creation of the monopoly violate the Thirteenth and Fourteenth
Amendments?
Conclusion
5–4 DECISION FOR VARIOUS MAJORITY OPINION BY SAMUEL F. MILLER
The Privileges and Immunities Clause of the Fourteenth Amendment
applies to national citizenship, not to state citizenship.
The Court held that the monopoly violated neither the Thirteenth or
Fourteenth Amendments, reasoning that these amendments were passed
with the narrow intent to grant full equality to former slaves. Thus,
to the Court, the Fourteenth Amendment only banned the states from
depriving blacks of equal rights; it did not guarantee that all
citizens, regardless of race, should receive equal economic privileges
by the state. Any rights guaranteed by the Privileges or Immunities
Clause were limited to areas controlled by the federal government,
such as access to ports and waterways, the right to run for federal
office, and certain rights affecting safety on the seas. Moreover,
the Court held that the butchers bringing suit were not deprived of
their property without due process of law because they could still
earn a legal living in the area by slaughtering on the Crescent City
Company grounds. Thus, the Court concluded that the Louisiana law was
constitutional.
Justice Stephen Johnson Field’s dissent argued that the Fourteenth
Amendment could not be construed as only protecting former slaves.
Rather, he believed that it incorporated strands of common-law
doctrine and needed to be interpreted outside the Civil War context.
This position would later become widely accepted.
Later cases would also interpret U.S. Constitution, Art IV §2 Cl. 1, which states that:
The citizens of each state shall be entitled to all privileges and
immunities of citizens in the several states.
very narrowly, following the lead of the Slaughterhouse cases, mostly by holding that particular privileges and immunities other than a narrow core handful of state law rights and privileges and duties, were not associated with state citizenship per se.