Here’s everything you need to know about 'Brexit'

The UK is gone.

British voters surprised the world on Thursday by voting to leave the European Union, setting in motion an unpredictable sequence of events that have already destabilized financial markets and could cause years of uncertainty. How did this happen? Why now? And what next?

British citizens essentially voted on one basic question: Should the United Kingdom remain in the European Union, or leave?

If they had voted to stay, global markets would have breathed a sigh of relief and gone back to business as usual. But instead, BRits voted 51.8% to 48.2% to EXIT the EU — Brexit, get it? — causing the kind of uncertainty that makes markets manic.

The European Union is a group of 28 countries that have agreed, over time, to abide by certain rules that supercede each nation’s own rules and laws. This is mainly to facilitate trade and commerce in ways that make each signatory country better off. In principle, the EU supports “four freedoms”— the free flow of goods, services, workers and capital among all 28 countries. There’s no analog in the US because all of those things can already move unimpeded from state to state.

The EU is different from the eurozone, which is a group of 18 countries that have adopted the euro as their currency, including Germany, France, Spain and Italy. The UK does not use the euro, nor do other EU countries such as Sweden, Poland or Hungary. Nations can still benefit from membership in the EU while retaining their own currencies.

Rising immigration levels

European governance can be arcane, but the main reason for the Brexit vote will be familiar to many Americans: concern about immigration. EU rules allow any citizen of an EU country to live in any other  EU country and enjoy most privileges of citizenship, including social services. In recent years, there’s been a sharp jump in the number of people coming to the UK from other EU nations, including newer entrants such as Romania and Bulgaria. Some native Brits feel immigrants are collecting an unfairly large share of welfare payments and child benefit payments — which has become a touchy political issue, much as it has here in the US.

While running for reelection in 2015, Prime Minister David Cameron vowed to cut the net inflow of people to the UK to fewer than 100,000 a year. Last year, however, that number hit 330,000. Cameron, who staunchly opposed Brexit, also made a campaign promise to hold a referendum on the matter, which is what happened on Thursday.

Cameron obviously misjudged the nationalist fervor simmering in the UK and the outcome of the vote. He announced his resignation following the results, saying the country needed "fresh leadership" to take it in the direction the people had chosen.