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.
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".
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.
Will I still be able to use my passport?
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.
By Brian Wheeler & Alex Hunt