Mr Cameron has said it should be up to the next prime minister to decide when to activate Article 50 of the 2009 Lisbon Treaty - setting in motion the formal legal process of withdrawing from the EU.
Once Article 50 is triggered, there is no way back into the EU unless by unanimous consent from all other member states.
But quitting the EU is not an automatic process - it has to be negotiated with the remaining members. These negotiations are meant to be completed within two years but the European Parliament has a veto over any new agreement formalising the relationship between the UK and the EU.
Leave campaigners have said there is no need to trigger Article 50 immediately, suggesting that first there should be a period of informal discussions with other EU members and the European Commission to iron out the main issues and the likely timetable.
The idea, they say, would be to allow other EU leaders the time to realise they need a "friendly" trade deal with the UK to continue exporting their consumer goods into the British market without tariffs.
There is also a suggestion that Article 50 should not be invoked until after the French presidential elections in May 2017 and the German parliamentary elections next year to avoid Brexit becoming an issue in the campaigns.
Also Britain could, technically, ignore all of this, the Vote Leave campaign says, and simply write the EU out of its laws, although that wouldn't make future negotiations any easier.