Voters have voted in favor of Brexit: British exit from the European Union. That means that in the coming months, British and European leaders will begin negotiating the terms of Britain's departure.

Britain's exit will affect the British economy, immigration policy, and lots more. It will take years for the full consequences to become clear. But here are some of the most important changes we can expect in the coming months.

The process of leaving the EU will take years

Britain's vote to leave the EU is not legally binding, and there are a few ways it could theoretically be blocked or overturned. However, as the BBC notes, "it would be seen as political suicide to go against the will of the people as expressed in a referendum."

Article 50 of the Treaty on European Union establishes the procedures for a member state to withdraw from the EU. It requires the member state to notify the EU of its withdrawal and obliges the EU to then try to negotiate a withdrawal agreement with that state.

Britain's "Leave" vote, however, does not represent that formal notification. That notification could take place within days — for example, when EU member countries meet for a summit that is scheduled for June 28 to 29. Or British officials might wait a few months to pull the trigger.

Once Britain invokes Article 50, it will have a two-year window in which to negotiate a new treaty to replace the terms of EU membership. Britain and EU leaders would have to hash out issues like trade tariffs, migration, and the regulation of everything from cars to agriculture.

In the best-case scenario, Britain may be able to negotiate access to the European market that isn’t that different from what it has now. Norway is not a member of the EU, but it has agreed to abide by a number of EU rules in exchange for favorable access to the European Common Market.

The vote has forced Prime Minister David Cameron to resign

British Prime Minister David Cameron didn’t want to hold a vote on Brexit at all. But in 2014, he faced growing pressure from the populist right over immigration and Britain’s EU membership. To mollify dissenters in his own party and stop the rise of the far-right UK Independence Party, Cameron promised to hold a referendum on leaving the EU if his Conservative Party won the 2015 election.

The Conservatives surprised pollsters by winning an outright majority in Parliament, and Cameron kept his promise. But he wasn’t personally in favor of exiting the EU, and he campaigned vigorously for a "Remain" vote. At the same time, he allowed other members of his government to campaign on the other side. This created the spectacle of senior members of the UK government, from the same party, campaigning on opposite sides of one of the biggest issues in British politics in decades.

Not long after Thursday's results became clear, Cameron announced that he would resign by October. It's unclear what will happen next, but one likely outcome will be for Cameron to be replaced by Boris Johnson, a member of Cameron's Conservative Party and former London mayor who campaigned for a Leave vote. It's also possible that the Conservative Party will splinter so badly that no one is able to claim a parliamentary majority, forcing early elections.

The Brexit will cause problems for Britain's economy

In the short run, uncertainty about Britain’s future relationship with the EU, its largest trading partner, could push the UK into a recession. Friday saw huge market volatility. The British pound has lost about 9 percent of its value since Thursday's vote, and Britain's FTSE 100 stock index lost 3 percent of its value in Friday trading. When you consider that the FTSE is priced in pounds, that means British stocks are down more than 10 percent in real terms.

And that volatility reflects market worries about more severe consequences in the months ahead. With Cameron out of power, Britain’s prospects of negotiating a favorable deal with the EU could be weakened. The EU may decide to strike a hard bargain to discourage other countries from leaving the EU. Or the UK’s new leader might not be willing to accept the kind of restrictions that come with a Norway-style deal.

And that could create serious problems for businesses based in the UK.

"If you are Nissan or some other car producer with major production in the UK, today, the same safety standards and environmental standards allow you to sell everywhere in the European market," Jacob Funk Kirkegaard, an economist at the Peterson Institute for International Economics, told me. But if the UK leaves the EU, "you would no longer be able to sell into other European markets, not because you face a small tariff but because you'd have to go through another set of safety certifications. This kind of thing would be repeated in every industry you can think of."

Critics say the economic effects could be large. The UK government has estimated that exiting the EU could cause the British economy to be between 3.8 and 7.5 percent smaller by 2030 — depending on how well negotiations for access to the European market ultimately go. Other reports have found smaller but still significant impacts.

The Brexit means significant uncertainty for migrants

One of the most important and controversial achievements of the EU was the establishment of the principle of free movement among EU countries. A citizen of one EU country has an unfettered right to live and work anywhere in the EU. Both Britons and foreigners have taken advantage of this opportunity.

Currently there are about 1.2 million Brits living in other EU countries, while about 3 million non-British EU nationals live in Britain. Thanks to EU rules, they were able to move across the English Channel with a minimum of paperwork. Britain’s exit from the EU could change that profoundly.

It’s possible, of course, that Britain could negotiate a new treaty with the EU that continues to allow free movement between the UK and the EU. But resentment of EU immigrants — especially from poorer, economically struggling countries like Poland and Lithuania — was a key force driving support for Brexit. So the British government will be under immense pressure to refuse to continue the current arrangement.

At a minimum, that would mean that people moving to or from Britain would need to worry about passports and residency rules. And it could mean that some British immigrants may lose their right to continue living and working in the UK and be deported.

"The withdrawal process is unprecedented," a British government spokesperson said a few weeks ago. "There is a great deal of uncertainty about how it would work."

Get today's biggest news in your inbox. Sign up for Vox Sentences: By signing up, you agree to our terms.

Brexit could trigger a breakup of the UK

Brexit could also change the United Kingdom in a more fundamental way. It's called the "United" Kingdom because it's made up of four "countries" — England, Wales, Scotland, and Northern Ireland. But with Britain now on its way out of the EU, there's a danger it won't stay united for very long.

Scotland supported Remain on Thursday by a margin of 62 percent to 38 percent. And the Scots in particular have never been entirely satisfied with English domination, as shown by the 44 percent of Scottish people who voted to make Scotland an independent country in 2014. They like having the UK be part of the EU in part because it provides a counterweight to English power within the UK.

So Britain's exit from the EU could strengthen the hand of Scottish separatists. A key Scottish leader has already signaled that she wants to hold a second referendum on Scottish independence. If that vote succeeded, Scotland would likely petition for admission to the EU in its own right.

A similar, but possibly more troubling, situation could emerge in Ireland, which has long been divided between a protestant North that's part of the UK and an independent Irish republic in the South. Tensions across the border have been minimized by EU rules guaranteeing the right to move across the border. But if the UK withdraws from the EU, the border could become more important and tensions over territory could flare up.

Perhaps for this reason, voters in Northern Ireland supported Remain 56 percent to 44 percent. There's a chance that a UK exit from the EU could provide renewed momentum for Northern Ireland to try to leave the UK and unify with the rest of Ireland.

Read more

Watch: How the euro caused the 2015 Greek crisis