The United Kingdom, which consists of England, Scotland, Wales, and Northern Ireland, has voted to leave the European Union (EU), a collection of 28 countries operating as a single economic and political block.

To understand the EU, think of it as if the United States consisted of 50 separate countries that all have their own local governments, with no centralized figurehead, but where many other central services and bureaucracy remain in place. The creation of the EU introduced the Schengen passport-free area for many member countries, removing borders throughout much of Europe for both people and money. For the countries that adopted the Schengen agreement, travel between them is no different than moving between any two U.S. states.

alternating United Kingdom and European Union flags hanging from building

Image source: Getty Images.

One challenge of the EU is that there are exceptions and the U.K. has always been one. It has not adopted the EU’s currency, nor did it sign the Schengen agreement for completely open intra-EU boarders. 

The U.K. vote -- dubbed a "Brexit" as a combination of Britain and exit -- puts the entire union at risk and it has sent global stock markets into turmoil.

What happens next?

The vote taken in the U.K. may be historic, but it's not actually binding nor does it cause the country to immediately leave the EU. Instead, the vote gives the Prime Minister -- and only the prime minister -- the ability to trigger Article 50 of the Treaty of Lisbon, the document which forms the legal basis for the EU, and that's when things get interesting.

Actually, things get interesting before then. The U.K. cannot begin negotiations with the EU for the terms of its exit until the Article is formally enacted and, as we've established, it's up to the country's prime minister to trigger Article 50. But Prime Minister David Cameron tendered his resignation after the vote (he is expected to be replaced by October) and speculation is that Cameron will leave triggering the Article to his successor, though he faces pressure to do it immediately. 

Cameron, as you can likely guess, was not in favor of the Brexit. Even though he has resigned, he cannot actually leave office until a successor has been chosen (technically until he can advise the Queen of the name of his successor, which Cameron cannot do until one has been picked).

Aside from those political machinations, the actual process of leaving the EU -- which has been estimated to take two years -- does not begin until Article 50 gets triggered, which EU officials have urged the U.K. to do quickly in an official statement:

Any delay would unnecessarily prolong uncertainty. We have rules to deal with this in an orderly way. Article 50 of the Treaty on European Union sets out the procedure to be followed if a Member State decides to leave the European Union. We stand ready to launch negotiations swiftly with the United Kingdom regarding the terms and conditions of its withdrawal from the European Union.

This is all new ground as no state has ever left the EU. Triggering Article 50 simply begins the exit negotiations. And, to make matters even more confusing, it does not have to result in the U.K. leaving. It remains possible that the people of the U.K. could change their minds or that a partial exit ends up being negotiated.

What does Brexit mean?

In the short term, the Brexit vote has sent global financial markets into panic simply because of the unknown. That has created significant pressure for Cameron to invoke Article 50 because until he does that no exit negotiations can take place.

The actual details of the exit will have repercussions beyond their short- and long-term impact on markets around the world. Everything from border crossings to immigration now has to be decided.  

In a very broad example, the negotiations will have to determine things like taxes for a non-U.K. (but EU) citizen living in the country legally. Both parties will also have to decide on work rules for what would become "foreign" workers moving between the U.K. and the EU.

In addition, all of the countries involved will have to establish trade agreements, mutual defense treaties, and generally establish how they will (or won't) work together.

Even the exit negotiations themselves are difficult as each of the 27 countries remaining in the EU have the power of veto over the conditions of the U.K. leaving. The deal reached by the Members of the European Parliament in Strasbourg will then be reviewed by each member country's parliament, a daunting task. 

Could this end the EU?

The challenge of negotiating the British exit is try to keep the U.K. as a partner to the EU without giving it a special deal that makes leaving attractive to the other wealthy countries in the group. Part of the reason this vote has caused stock market uncertainty is that this could begin a string of departures.

"Some people in the EU community believe that Britain quitting its membership could encourage other nations to follow suit with referendums of their own-or demand tailor-made deals of their own, explained The Telegraph.

Going forward, the only thing immediately known is that the people of the U.K. have expressed their desire to leave. The actual Brexit process will start when (and in theory if) Article 50 is triggered and then the complicated negotiations will begin. The immediate future is uncertain and this uncertainty is likely to continue for an extended period of time.

Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.