States in international law are the equivalent of people in civil law. They are born and they die. They can make contracts (treaties), enter partnerships (international organizations), create duties for themselves and make duties for others. When people form a state, they ascend to the highest level of dialogue in the world.
The following rules are customary, but are generally observed by the international community, with the exception of a few maniacal dictators here and there.
How a state is born
A state can be formed by a number of acts: it can secede from another state, be granted independence by another state, or be conquered by someone. Nowadays, everyone agrees that a state has to meet four criteria before it is truly a state.
- A state must have defined territory. Just about any amount of territory will do: the Vatican consists of just a few buildings in Rome. The definition need not be exact, either: the United States became a state long before it figured out where its western frontier was located, and Israel is a state despite most of its borders being unsettled. But the territory must be there: a state cannot be ephemeral, which probably disqualifies most of the micronations started by people on the internet with too much free time.
A state acquires territory by possessing it. If the territory is uninhabited, this means getting there and raising a flag. If the territory is already claimed by someone, the state seeking possession must either have the prior claimant(s) relinquish their claim (by treaty or otherwise), or occupy the territory for an extended period without protest from the other claimant(s).
- A state must have a permanent population. People must live there long-term. Chile once tried to claim the Antarctic Peninsula as part of its territory, but the claim didn't work under international law because there was no permanent population (despite a valiant effort to get pregnant Chilean women to have babies there).
- A state must have a government. A state may exist despite being occupied by another, as was the case with France during World War II and Kuwait during the Gulf War. However, purely puppet governments (e.g. Manchukuo) and territories without an effective government (e.g. Finland during its civil war) can fall due to this provision.
- A state must have capacity to engage in foreign relations. The key is capacity. The Cook Islands, represented in foreign relations by New Zealand, are not generally considered to be a state because they clearly don't have the resources to engage in foreign relations on their own. Liechtenstein, on the other hand, is represented by Switzerland, but still considered to be a state because the representation is for convenience and not for necessity. In other words, Liechtenstein could represent itself: it just chooses not to, and this does not affect its statehood.
Another important factor is recognition. Some states, like Taiwan and North Korea, are only formally "recognized" by a handful of other states. Other states, like Biafra and Rhodesia, are recognized by nobody at all. Recognition is an act of individual states, and states are free to set their own criteria (often political) to determine who is recognized and who is not. Winston Churchill famously characterized the process as "not to confer a compliment, but to secure a convenience."
If a state is not recognized, it can mean one of two things. A state may be indirectly recognized, as is generally the case with Taiwan: while it is not referred to as a state by many countries, it is treated like a state, has de facto embassies and can engage in foreign relations as long as it can put up with China's complaining. On the other hand, states may refuse to recognize a state's existence for any purpose at all, as was the case with Biafra.
The famine in Biafra, partly caused by its international pariah status, showed that total non-recognition can be particularly disastrous, so nowadays states will generally acknowledge each other's statehood even if they are unwilling to give formal recognition. This is known as the declaratory theory of statehood. It is generally most convenient arrangement for everyone concerned: one example was the case of the USS Pueblo, in which the United States negotiated with North Korea despite not recognizing its statehood, and ended up securing the return of a number of U.S. military personnel.
Sovereignty is often cited as a criterion. However, nobody can actually provide a coherent definition of sovereignty, so it is probably not a good criterion upon which to base an argument of statehood. Many Western countries like to plug self-determination, but this is more of a criterion for recognition than it is for statehood (and for that matter, its enforcement is rather selective).
How a state dies
A state can "die" by breaking up, being conquered or merging with another. The death of a state can cause all sorts of interesting legal issues.
Its membership in international organizations, for example, is up to whichever states succeed it. This is how Russia came to occupy the positions formerly held by the USSR: after the breakup of the USSR, the members of the Commonwealth of Independent States agreed to let Russia accede to the USSR's positions. However, Serbia and Montenegro did not get such an agreement from the other states comprising the Cold War-era Yugoslavia, and as a result the new Yugoslavia had to be admitted to the United Nations as a brand-new member state.
National debts and contractual obligations pose similar problems. If a debt or obligation is tied to a particular territory, it is generally supposed to end up in the hands of whichever state ultimately controls that territory. But this rule has been contested by many states historically, such as Germany following its merger with Austria in the 1930s: they prefer a tabula rasa or "clean slate" theory.