Britain's exit from the EU is expected to be difficult and Mr Cameron's successor will also face a challenge to hold the UK together, following warnings that a second Scottish independence vote is now "very likely".
Holding back tears during his speech on Friday, Mr Cameron said he would not depart immediately and would seek to 'steady the ship' and calm the financial markets over the coming "weeks and months".
"I held nothing back," he said. "I was absolutely clear about my belief that Britain is stronger, safer and better off inside the EU.
"And I made clear the referendum was about this and this alone - not the future of any single politician including myself.
"But the British people have made a very clear decision to take a different path and as such I think the country requires fresh leadership to take it in this direction."
His resignation will be delayed for 100 days, taking him through until the start of the Conservative party conference in October.
Former London Mayor Boris Johnson has put himself into a good position to succeed Mr Cameron.
Mr Johnson, who was booed and called a "t***" by protesters as he left his central London home on Friday morning, stopped short of confirming he would stand to succeed the PM - but made a pitch for people to help him forge a better future.
He made his speech just hours after his long-time rival tearfully declared he would stand aside.
Whoever does take over from Mr Cameron will face a challenging first few months in power, with SNP leader Nicola Sturgeon warning that a second ballot on Scottish independence was now "highly likely".
Despite massive support for Remain in Scotland and in most of the UK's major cities, including a 60 per cent vote in London, the Leave campaign managed to stack up 52 per cent of the vote on Thursday night.
As Mr Johnson thanked voters for trusting his plan to leave the EU, leaders stepped in to quell rising panic after the shock win.
The Bank of England governor Mark Carney attempted to reassure panicking markets after the Pound nose-dived on Thursday night to its lowest level against the US dollar for 31 years, and he FTSE slumped by 8 per cent. The index closed just 2.7 per cent down, as it recovered.
Meanwhile London Mayor Sadiq Khan released a statement saying he still believed London was better off within the EU, and sending support to the city's immigrants.
"I want to send a particular message to the almost one million Europeans living in London, who make a huge contribution to our city - working hard, paying taxes and contributing to our civic and cultural life. You are welcome here," he said.
"We value the enormous contribution you make to our city and that will not change as a result of this referendum."