This article is designed to be an easy-to-understand guide now that the UK has voted to leave the European Union.
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
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.
Media captionHow does the European Union work?
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.