The country does not leave the EU overnight.
What it means in the short-term is that at some point Britain will begin the process of withdrawing as set out in EU treaties.
Article 50 of the Lisbon Treaty says that a member state which decides to leave must notify the European Council of its intention.
This task will fall to David Cameron or his successor in the event of his resignation or a leadership challenge.
Once that process starts, there is a two-year window in which to negotiate an agreement to withdraw.
It can be extended, but only with the agreement of the 27 other member states.
During that time, the UK will remain part of the EU and its laws will still apply.
If an agreement is not reached within the allocated period and no extension is agreed, then the UK will leave the EU at that point.
In those circumstances, it would have to rely on World Trade Organisation (WTO) rules and fall back on domestic immigration law.
The former would not necessarily be straightforward as it would require negotiations between the UK and other WTO members.
Many expect the process of negotiating the UK’s trading arrangements with the EU will mean more than two years are needed.
Given immigration has played such a big role in the referendum campaign, it is doubtful a model such as that of non-EU states Norway or Switzerland would satisfy those who campaigned and voted for a Brexit.
The former is in the European Economic Area and as such must apply the same free movement of people rules without having a say over them.
Switzerland is not a member of the EU either, but there is a bilateral free movement of persons agreement, which removed restrictions on EU citizens wishing to live or work there.