What has happened?
A referendum - a vote in which everyone (or nearly everyone) of voting age can take part - was held on Thursday 23 June, to decide whether the UK should leave or remain in the European Union.
Leave won by 52% to 48%.
The referendum turnout was 71.8%, with more than 30 million people voting. It was the highest turnout in a UK-wide vote since the 1992 general election.
Find the result in your area
What was the breakdown across the UK?
England voted strongly for Brexit, by 53.4% to 46.6%, as did Wales, with Leave getting 52.5% of the vote and Remain 47.5%.
Scotland and Northern Ireland both backed staying in the EU. Scotland backed Remain by 62% to 38%, while 55.8% in Northern Ireland voted Remain and 44.2% Leave.
The European Union - often known as the EU - is an economic and political partnership involving 28 European countries (click here if you want to see the full list). It began after World War Two to foster economic co-operation, with the idea that countries which trade together are more likely to avoid going to war with each other.
It has since grown to become a "single market" allowing goods and people to move around, basically as if the member states were one country.
It has its own currency, the euro, which is used by 19 of the member countries, its own parliament and it now sets rules in a wide range of areas - including on the environment, transport, consumer rights and even things such as mobile phone charges. Click here for a beginners' guide to how the EU works.
What does Brexit mean?
It is a word that has become used as a shorthand way of saying the UK leaving the EU - merging the words Britain and exit to get Brexit, in a same way as a Greek exit from the EU was dubbed Grexit in the past.
What happens now?
For the UK to leave the EU it has to invoke an agreement called Article 50 of the Lisbon Treaty.
Cameron or his successor needs to decide when to invoke this - that will then set in motion the formal legal process of withdrawing from the EU, and give the UK two years to negotiate its withdrawal.
The article has only been in force since late 2009 and it hasn't been tested yet, so no-one really knows how the Brexit process will work, according to BBC legal correspondent Clive Coleman.
Mr Cameron, who has said he would be stepping down as PM by October, said he will go to the European Council next week to "explain the decision the British people have taken".
EU law still stands in the UK until it ceases being a member - and that process could take some time.
The UK will continue to abide by EU treaties and laws, but not take part in any decision-making, as it negotiates a withdrawal agreement and the terms of its relationship with the now 27 nation bloc.
What happens to UK citizens working in the EU?
A lot depends on the kind of deal the UK agrees with the EU after exit.
If it remains within the single market, it would almost certainly retain free movement rights, allowing UK citizens to work in the EU and vice versa.
If the government opted to impose work permit restrictions, as UKIP wants, then other countries could reciprocate, meaning Britons would have to apply for visas to work.
Will I need a visa to travel to the EU?
While there could be limitations on British nationals' ability to live and work in EU countries, it seems unlikely they would want to deter tourists. There are many countries outside the EEA that British citizens can visit for up to 90 days without needing a visa and it is possible that such arrangements could be negotiated with European countries.
What about EU nationals who want to work in the UK?
Again, it depends on whether the UK government decides to introduce a work permit system of the kind that currently applies to non-EU citizens, limiting entry to skilled workers in professions where there are shortages.
Citizens' Advice has reminded people their rights have not changed yet and asked anyone to contact them if they think they have been discriminated against following the Leave vote.
Yes. It is a British document - there is no such thing as an EU passport, so your passport will stay the same. In theory, the government could, if it wanted, decide to change the colour, which is currently standardised for EU countries, says the BBC's Europe correspondent, Chris Morris.
Some say we could still remain in the single market - but what is a single market?
The single market is seen by its advocates as the EU's biggest achievement and one of the main reasons it was set up in the first place.
Britain was a member of a free trade area in Europe before it joined what was then known as the common market. In a free trade area countries can trade with each other without paying tariffs - but it is not a single market because the member states do not have to merge their economies together.
The European Union single market, which was completed in 1992, allows the free movement of goods, services, money and people within the European Union, as if it was a single country.
It is possible to set up a business or take a job anywhere within it. The idea was to boost trade, create jobs and lower prices. But it requires common law-making to ensure products are made to the same technical standards and imposes other rules to ensure a "level playing field".
Critics say it generates too many petty regulations and robs members of control over their own affairs. Mass migration from poorer to richer countries has also raised questions about the free movement rule. Read more: A free trade area v EU single market
Has any other member state ever left the EU?
No nation state has ever left the EU. But Greenland, one of Denmark's overseas territories, held a referendum in 1982, after gaining a greater degree of self government, and voted by 52% to 48% to leave, which it duly did after a period of negotiation. The BBC's Carolyn Quinn visited Greenland at the end of last year to find out how they did it.
What does this mean for Scotland?
Scotland's First Minister Nicola Sturgeon said in the wake of the Leave result that it is "democratically unacceptable" that Scotland faces being taken out of the EU when it voted to Remain.
What does it mean for Northern Ireland?
Deputy First Minister Martin McGuinness said the impact in Northern Ireland would be "very profound" and that the whole island of Ireland should now be able to vote on reunification.
But Northern Ireland Secretary Theresa Villiers has ruled out the call from Sinn Féin for a border poll, saying the circumstances in which one would be called did not exist.
What will happen to the Conservative leadership?
David Cameron has said a new prime minister should be in place by the beginning of the Conservative party conference on 2 October.
Nominations for a replacement leader will come from Conservative members of the House of Commons.
If one nomination is received, the new leader is declared elected. If two nominations are made, both names go forward for the members of the party across the UK to vote on by post.
In the event that three or more MPs are nominated for leader, a ballot of Conservative MPs is held "on the Tuesday immediately following the closing date for nominations".
How will pensions, savings, investments and mortgages be affected?
During the referendum campaign, the prime minister said the so-called "triple lock" for state pensions would be threatened by a UK exit. This is the agreement by which pensions increase by at least the level of earnings, inflation or 2.5% every year - whichever is the highest.
If economic performance deteriorates, the Bank of England could decide on a further programme of quantitative easing, as an alternative to cutting interest rates, which would lower bond yields and with them annuity rates. So anyone taking out a pension annuity could get less income for their money.
The Bank of England may consider raising interest rates to combat extra pressure on inflation. That would make mortgages and loans more expensive to repay but would be good news for savers.
The Treasury previously forecast a rise of between 0.7% and 1.1% in mortgage borrowing costs, with the prime minister claiming the average cost of a mortgage could increase by up to £1,000 a year.
The Treasury argued during the referendum campaign that UK shares would become less attractive to foreign investors in the event of Brexit and would therefore decline in value, but in the longer term shares typically rise with company profits. Big exporters might benefit from the weaker pound, so the value of their shares might well rise, while importers might see profits squeezed.
Journalists and writers on social media have greeted the reintroduction of duty-free sales as an "upside" or "silver lining" of Brexit.
As with most Brexit consequences, whether this will happen depends on how negotiations with the EU play out - whether the "customs union" agreement between Britain and the EU is ended or continued.
Eurotunnel boss Jacques Gounon said last November the reintroduction of duty-free would be "an incredible boost for my business" but he later said that remark had been "light-hearted".
Erik Juul-Mortensen, president of the Tax Free World Association (TFWA) said after the referendum vote "it is not possible to predict how Brexit will affect the duty free and travel retail industry, and it is wiser not to make assumptions about exactly what the impact will be."
Will our EHIC cards still be valid?
No-one knows for definite. The EHIC card - which entitles travellers to state-provided medical help for any condition or injury that requires urgent treatment, in any other country within the EU, as well as several non-EU countries - is not an EU initiative. It was negotiated between countries within a group known as the European Economic Area, often simply referred to as the single market (plus Switzerland, which confusingly is not a member of the EEA, but has agreed access to the single market). Therefore, the future of Britons' EHIC cover could depend on whether the UK decided to sever ties with the EEA.
Will cars need new number plates?
Probably not, says BBC Europe correspondent Chris Morris, because there's no EU-wide law on vehicle registration or car number places, and the EU flag symbol is a voluntary identifier and not compulsory. The DVLA says there has been no discussion about what would happen to plates with the flag if the UK voted to leave.
Could MPs block an EU exit?
Could the necessary legislation pass the Commons, given that a lot of MPs - all SNP and Lib Dems, nearly all Labour and many Conservatives - were in favour of staying?
The referendum result is not legally binding - Parliament still has to pass the laws that will get Britain out of the 28 nation bloc, starting with the repeal of the 1972 European Communities Act.
The withdrawal agreement also has to be ratified by Parliament - the House of Lords and/or the Commons could vote against ratification, according to a House of Commons library report.
In practice, Conservative MPs who voted to remain in the EU would be whipped to vote with the government. Any who defied the whip would have to face the wrath of voters at the next general election.
One scenario that could see the referendum result overturned, is if MPs forced a general election and a party campaigned on a promise to keep Britain in the EU, got elected and then claimed that the election mandate topped the referendum one.
Two-thirds of MPs would have to vote for a general election to be held before the next scheduled one in 2020.
Will leaving the EU mean we don't have to abide by the European Court of Human Rights?
The European Court of Human Rights (ECHR) in Strasbourg is not a European Union institution.
It was set up by the Council of Europe, which has 47 members including Russia and Ukraine. So quitting the EU will not exempt the UK from its decisions.
However, the UK government is committed to repealing the Human Rights Act which requires UK courts to treat the ECHR as setting legal precedents for the UK, in favour of a British Bill of Rights.
As part of that, David Cameron is expected to announce measures that will boost the powers of courts in England and Wales to over-rule judgements handed down by the ECHR.
However, the EU has its own European Court of Justice, whose decisions are binding on EU institutions and member states.
Will the UK be able to rejoin the EU in the future?
BBC Europe editor Katya Adler says the UK would have to start from scratch with no rebate, and enter accession talks with the EU.
Every member state would have to agree to the UK re-joining. But she says with elections looming elsewhere in Europe, other leaders might not be generous towards any UK demands.
New members are required to adopt the euro as their currency, once they meet the relevant criteria, although the UK could try to negotiate an opt-out.
Who wanted the UK to leave the EU?
The UK Independence Party, which won the last European elections, and received nearly four million votes - 13% of those cast - in May's general election, campaigned for Britain's exit from the EU.
About half of Conservative MPs, including five cabinet ministers, several Labour MPs and the DUP were also in favour of leaving.
What were their reasons for wanting the UK to leave?
They said Britain was being held back by the EU, which they said imposed too many rules on business and charged billions of pounds a year in membership fees for little in return. They also wanted Britain to take back full control of its borders and reduce the number of people coming here to live and/or work.
One of the main principles of EU membership is "free movement", which means you don't need to get a visa to go and live in another EU country. The Leave campaign also objected to the idea of "ever closer union" and what they see as moves towards the creation of a "United States of Europe".
Who wanted the UK to stay in the EU?
Prime Minister David Cameron wanted Britain to stay in the EU. He sought an agreement with other European Union leaders to change the terms of Britain's membership.
He said the deal would give Britain "special" status and help sort out some of the things British people said they didn't like about the EU, like high levels of immigration - but critics said the deal would make little difference.
Sixteen members of the PM's cabinet also backed staying in. The Conservative Party pledged to be neutral in the campaign - but the Labour Party, SNP, Plaid Cymru and the Lib Dems were all in favour of staying in.
US president Barack Obama also wanted Britain to remain in the EU, as did other EU nations such as France and Germany.
What were their reasons for wanting the UK to stay?
Those campaigning for Britain to stay in the EU said it gets a big boost from membership - it makes selling things to other EU countries easier and, they argued, the flow of immigrants, most of whom are young and keen to work, fuels economic growth and helps pay for public services.
They also said Britain's status in the world would be damaged by leaving and that we are more secure as part of the 28 nation club, rather than going it alone.
What about businesses?
Big business - with a few exceptions - tended to be in favour of Britain staying in the EU because it makes it easier for them to move money, people and products around the world.
BT chairman Sir Mike Rake, a recent CBI president, said there were "no credible alternatives" to staying in the EU. But others disagreed, such as Lord Bamford, chairman of JCB, who said an EU exit would allow the UK to negotiate trade deals as our country "rather than being one of 28 nations".
Morgan Stanley sources told BBC business reporter Joe Lynam that it had started the process of moving about 2,000 staff based in London to either Dublin or Frankfurt. Ahead of the vote, the president of the investment bank, Colm Kelleher, told Bloomsberg that Brexit would be "the most consequential thing that we've ever seen since the war".
Who led the rival sides in the campaign?
- Britain Stronger in Europe - the main cross-party group campaigning for Britain to remain in the EU was headed by former Marks and Spencer chairman Lord Rose. It was backed by key figures from the Conservative Party, including Prime Minister David Cameron and Chancellor George Osborne, most Labour MPs, including party leader Jeremy Corbyn and Alan Johnson, who ran the Labour In for Britain campaign, the Lib Dems, Plaid Cymru, the Alliance party and the SDLP in Northern Ireland, and the Green Party. Who funded the campaign: Britain Stronger in Europe raised £6.88m, boosted by two donations totalling £2.3m from the supermarket magnate and Labour peer Lord Sainsbury. Other prominent Remain donors included hedge fund manager David Harding (£750,000), businessman and Travelex founder Lloyd Dorfman (£500,000) and the Tower Limited Partnership (£500,000). Read a Who's Who guide. Who else campaigned to remain: The SNP ran its own remain campaign in Scotland as it did not want to share a platform with the Conservatives. Several smaller groups also registered to campaign.
- Vote Leave - A cross-party campaign that has the backing of senior Conservatives such as Michael Gove and Boris Johnson plus a handful of Labour MPs, including Gisela Stuart and Graham Stringer, and UKIP's Douglas Carswell and Suzanne Evans, and the DUP in Northern Ireland. Former Tory chancellor Lord Lawson and SDP founder Lord Owen were also involved. It had a string of affiliated groups such as Farmers for Britain, Muslims for Britain and Out and Proud, a gay anti-EU group, aimed at building support in different communities. Who funded the campaign: Vote Leave raised £2.78m. Its largest supporter was businessman Patrick Barbour, who gave £500,000. Former Conservative Party treasurer Peter Cruddas gave a £350,000 donation and construction mogul Terence Adams handed over £300,000. Read a Who's Who guide. Who else campaigned to leave: UKIP leader Nigel Farage is not part of Vote Leave. His party ran its own campaign. The Trade Union and Socialist Coalition is also running its own out campaign. Several smaller groups also registered to campaign.
Will the EU still use English?
Yes, says BBC Europe editor Katya Adler. There will still be 27 other EU states in the bloc, and others wanting to join in the future, and the common language tends to be English - "much to France's chagrin", she says.
Will a Brexit harm product safety?
Probably not, is the answer. It would depend on whether or not the UK decided to get rid of current safety standards. Even if that happened any company wanting to export to the EU would have to comply with its safety rules, and it's hard to imagine a company would want to produce two batches of the same products.
Thanks for sending in your questions. Here are a selection of them, and our answers:
Which MPs were for staying and which for leaving?
The good news for Edward, from Cambridge, who asked this question, is we have been working on exactly such a list. Click here for the latest version.
How much does the UK contribute to the EU and how much do we get in return?
In answer to this query from Nancy from Hornchurch - the UK is one of 10 member states who pay more into the EU budget than they get out, only France and Germany contribute more. In 2014/15, Poland was the largest beneficiary, followed by Hungary and Greece.
The UK also gets an annual rebate that was negotiated by Margaret Thatcher and money back, in the form of regional development grants and payments to farmers, which added up to £4.6bn in 2014/15. According to the latest Treasury figures, the UK's net contribution for 2014/15 was £8.8bn - nearly double what it was in 2009/10.
The National Audit Office, using a different formula which takes into account EU money paid directly to private sector companies and universities to fund research, and measured over the EU's financial year, shows the UK's net contribution for 2014 was £5.7bn. Read more number crunching from Reality Check.
If I retire to Spain or another EU country will my healthcare costs still be covered?
David, from East Sussex, is worried about what will happen to his retirement plans. This is one of those issues where it is not possible to say definitively what would happen. At the moment, the large British expat community in Spain gets free access to Spanish GPs and their hospital treatment is paid for by the NHS. After they become permanent residents Spain pays for their hospital treatment. Similar arrangements are in place with other EU countries.
If Britain remains in the single market, or the European Economic Area as it is known, it might be able to continue with this arrangement, according to a House of Commons library research note. If Britain has to negotiate trade deals with individual member states, it may opt to continue paying for expats' healthcare through the NHS or decide that they would have to cover their own costs if they continue to live abroad, if the country where they live declines to do so.
What will happen to protected species?
Dee, from Launceston, wanted to know what would happen to EU laws covering protected species such as bats in the event of Britain leaving the EU. The answer is that they would remain in place, initially at least. After the Leave vote, the government will probably review all EU-derived laws in the two years leading up to the official exit date to see which ones to keep or scrap.
The status of Special Areas of Conservation and Special Protection Areas, which are designated by the EU, would be reviewed to see what alternative protections could be applied. The same process would apply to European Protected Species legislation, which relate to bats and their habitats.
The government would want to avoid a legislative vacuum caused by the repeal of EU laws before new UK laws are in place - it would also continue to abide by other international agreements covering environmental protection.
How much money will the UK save through changes to migrant child benefits and welfare payments?
Martin, from Poole, in Dorset, wanted to know what taxpayers are likely to get back from the benefit curbs negotiated by David Cameron in Brussels. We don't exactly know because the details have not been worked out. HM Revenue and Customs have suggested about 20,000 EU nationals receive child benefit payments in respect of 34,000 children in their country of origin at an estimated cost of about £30m.
But the total saving is likely to be significantly less than that because Mr Cameron did not get the blanket ban he wanted. Instead, payments will be linked to the cost of living in the countries where the children live. David Cameron has said that as many as 40% of EU migrant families who come to Britain could lose an average of £6,000 a year of in-work benefits when his "emergency brake" is applied. The DWP estimates between 128,700 and 155,100 people would be affected. But the cuts will be phased in. New arrivals will not get tax credits and other in-work benefits straight away but will gradually gain access to them over a four year period at a rate yet to be decided.
Will we be barred from the Eurovision Song Contest?
Sophie from Peterborough, who asks the question, need not worry. We have consulted Alasdair Rendall, president of the UK Eurovision fan club, who says: "All participating countries must be a member of the European Broadcasting Union. The EBU - which is totally independent of the EU - includes countries both inside and outside of the EU, and also includes countries such as Israel that are outside of Europe. Indeed the UK started participating in the Eurovision Song Contest in 1957, 16 years before joining the then EEC."
What impact will there be on house prices?
John, in London, is concerned about what will happen to house prices if "millions of EU citizens need to leave" the UK following the referendum, creating a flood of available housing. This is one of those questions where there is no clear-cut factual answer. But we can say that none of the main players are suggesting that citizens of other EU countries will be "sent packing" (to use John's phrase) after the Leave vote. There are a host of other variables that have an impact on property prices, including things like interest rates and the general state of the economy.
What is the 'red tape' that opponents of the EU complain about?
Ged, from Liverpool, suspects "red tape" is a euphemism for employment rights and environmental protection. According to the Open Europe think tank, four of the top five most costly EU regulations are either employment or environment-related. The UK renewable energy strategy, which the think-tank says costs £4.7bn a year, tops the list. The working time directive (£4.2bn a year) - which limits the working week to 48 hours - and the temporary agency workers directive (£2.1bn a year), giving temporary staff many of the same rights as permanent ones - are also on the list.
There is nothing to stop a future UK government reproducing these regulations in British law following the decision to leave the EU. And the costs of so-called "red tape" will not necessarily disappear overnight - if Britain opted to follow the "Norway model" and remained in the European Economic Area most of the EU-derived laws would remain in place.
Will Britain be party to the Transatlantic Trade and Investment Partnership?
Ste, in Bolton, asked about this. The Transatlantic Trade and Investment Partnership - or TTIP - currently under negotiation between the EU and United States will create the biggest free trade area the world has ever seen.
Cheerleaders for TTIP, including David Cameron, believe it could make American imports cheaper and boost British exports to the US to the tune of £10bn a year.
But many on the left, including Labour leader Jeremy Corbyn, fear it will shift more power to multinational corporations, undermine public services, wreck food standards and threaten basic rights.
Quitting the EU means the UK would not be part of TTIP. It would have negotiate its own trade deal with the US.
What impact will leaving the EU have on the NHS?
Paddy, from Widnes, wanted to know how leaving the EU will affect the number of doctors we have and impact the NHS.
This became an issue in the referendum debate after the Leave campaign claimed the money Britain sends to the EU, which it claims is £350m a week, could be spent on the NHS instead. The BBC's Reality Check team looked into this claim.
Health Secretary Jeremy Hunt warned that leaving the EU would lead to budget cuts and an exodus of overseas doctors and nurses. The Leave campaign dismissed his intervention as "scaremongering" and insisted that EU membership fees could be spent on domestic services like the NHS.
Former Labour health secretary Lord Owen has said that because of TTIP (see answer above) the only way to protect the NHS from further privatisation was to get out of the EU.
A referendum – a vote in which everyone (or nearly everyone) of voting age can take part – was held on Thursday 23 June, to decide whether the UK should leave or remain in the European Union.
Leave won by 52% to 48%.
The referendum turnout was 71.8%, with more than 30 million people voting. It was the highest turnout in a UK-wide vote since the 1992 general election. Find the result in your area
What was the breakdown across the UK?
England voted strongly for Brexit, by 53.4% to 46.6%, as did Wales, with Leave getting 52.5% of the vote and Remain 47.5%.
Scotland and Northern Ireland both backed staying in the EU. Scotland backed Remain by 62% to 38%, while 55.8% in Northern Ireland voted Remain and 44.2% Leave. What is the European Union? The European Union – often known as the EU – is an economic and political partnership involving 28 European countries (click here if you want to see the full list) . It began after World War Two to foster economic co-operation, with the idea that countries which trade together are more likely to avoid going to war with each other.
It has since grown to become a "single market" allowing goods and people to move around, basically as if the member states were one country.It has its own currency, the euro, which is used by 19 of the member countries, its own parliament and it now sets rules in a wide range of areas – including on the environment, transport, consumer rights and even things such as mobile phone charges. Click here for a beginners’ guide to how the EU works. What does Brexit […]