But breaking up is hard to do. It will take at least two years -- if not more -- to sort out the historic exit from the 28-country bloc.
The UK has been a member of the Brussel-based EU and its precursors since 1973, and the British government now faces the gargantuan task of unraveling decades of legislation, treaties and deals between the UK and the EU, the single biggest market in the world.
First off, a caveat: The vote isn't technically binding, said New Bucks University law lecturer Lars Mosesson. The statute that allowed for the referendum doesn't contain any language requiring the government to do anything. It could, theoretically, ignore the vote, said Mosesson, who has been critical of the referendum.
It almost certainly won't, he said. Instead, it will do the democratic thing and treat the vote as politically binding.
But there's still the possibility, however slim, that the separation will never happen.
The deal does slam the door on a February agreement between London and Brussels that sweetened the UK's position in the EU. And EU leaders have indicated they won't enter into any further negotiations with the UK. But this is politics on a grand scale after all. And almost anything is possible when so much is at stake.
There's also the possibility of a second UK referendum. That's right, we could theoretically go through all of this one more time.
There's nothing legally preventing another vote, Mosesson said.
As of Friday night, more than 165,000 people had signed an online petition
with Parliament calling for a second vote. The demand was so overwhelming at times it was crashing government servers, British media reported.
So, assuming the politicians don't get a case of amnesia and a second referendum never materializes, how is this going to work?
Filing the divorce papers
Article 50 of the Treaty of Lisbon
governs the breakup. It's full of qualifiers and caveats and whatnots, so it's a bit difficult to say exactly how this separation will play out.
But, officially, things get started when the UK government formally notifies the EU of its intent to leave. That, the treaty says, starts a two-year timer on negotiations to unravel all of the legal frameworks, financial obligations and other knots binding the UK to the bloc. If the negotiations haven't wrapped up by the end of those two years, all those laws and rules will automatically cease to apply.
But it's not at all clear when that notice will come.
The European Council -- the heads of states or governments of EU members -- meets next week, and that's a natural time for such an announcement.
But Prime Minister David Cameron
, who previously said he would have to invoke the clause immediately, said Friday he'll let his successor deal with it. He decided Friday after the votes came in that he will resign.
"A negotiation with the European Union will need to begin under a new Prime Minister, and I think it is right that this new Prime Minister takes the decision about when to trigger Article 50 and start the formal and legal process of leaving the EU," Cameron said. "I will attend the European Council next week to explain the decision the British people have taken and my own decision."
Not even supporters are clamoring for a quick invocation.
Former London Mayor Boris Johnson, now a member of Parliament, said he agrees with Cameron that there is no need to invoke the Lisbon Treaty article immediately.
Presumably, at some point, someone will make that notice and that two-year clock will start ticking. Then again, it might not mean all that much either -- the treaty lets both sides agree to extend the negotiations indefinitely.
In other words, this could go on for a very long time.
In the meantime, not much will change.
"Until this process of negotiations is over, the United Kingdom remains a member of the European Union, with all the rights and obligations that derive from this," European Council President Donald Tusk said in a statement. "According to the Treaties which the United Kingdom has ratified, EU law continues to apply to the full to and in the United Kingdom until it is no longer a Member."
Negotiating the settlement
The Treaty of Lisbon says the negotiations on exactly how to sever the relationship will be governed by yet another treaty, the Treaty on the Functioning of the European Union
. That document calls for appointment of an EU negotiator and possibly the creation of a special committee to work on the talks.
No country has ever left the EU (although Greenland, part of Denmark, did exit the bloc's predecessor in 1985), and figuring out how to do so is going to be a tricky task.
EU laws and directives reach into practically every part of life in the UK, from the products consumers use to the food they eat to how they travel. In some cases, those directives are directly embedded in British law.
Negotiators will have to figure out the country's new relationship with the EU. How will trade work? What about travel? Will the Queen's subjects need passports to travel to France, for instance? Parliament will have to figure out what to do with the myriad laws that adopt or reference EU requirements.
The negotiations and reworking of laws could go on for years.
Despite no official notice, talks will informally start at next week's European Council meeting, Tusk said in a letter inviting heads of state to the event.
"First of all, we will discuss the so called 'divorce process' as described in Art. 50 of the Treaty," he said in the letter. "And secondly, we will start a discussion on the future of the European Union with 27 Member States."
Jan Techau, director of foreign policy think tank Carnegie Europe, said the EU is sure to play hardball when it comes to negotiating the UK's exit.
"First off, they will try to play it hard vis-a-vis the UK. It's quite clear they will have to unify around a position that will make it quite painful for the UK to negotiate this exit so that everybody sees what happens to you if you try to do the same thing," Techau said.
Finalizing the divorce
Once the UK and EU reach an agreement, the European Council will have to approve it by a majority vote of its members. British law doesn't require approval from Parliament, but it would be "unthinkable" for the government not to at least seek the approval of the House of Commons, said Mosesson, the law lecturer.
And then he dropped this nugget: "It is possible that there would be pressure for a referendum to approve those final terms, which would be interesting," he said, "Much will have changed by then, including the voters in the UK waking up to the implications of (Thursday's) vote."
Life after the split
Great Britain would go on as an independent country, free to make -- or not make -- any law it wishes and to make trade deals on its own. But it could be a little less "great" should Scotland have its way.
That country, which voted resoundingly to stay in the EU, might now seek independence
on account of being forced out of the bloc against its will, First Minister Nicola Sturgeon said Friday. Voters rejected
a previous independence bid in 2014.
The pro-independence Sinn Fein party in Northern Ireland also called for an Irish unity referendum -- taking Northern Ireland out of the UK.
"The British government can no longer claim to represent the political or economic interests of the North in Europe," Declan Kearney, Sinn Fein national chairman, told CNN.
The EU might face challenges of its own.
Greece has also considered leaving. With the UK's decision, other EU countries might start eyeing the door, and there could be huge consequences for the economy and stability on the continent.