The direct answer to that question — on June 24 itself, anyway — is nothing at all. The referendum is not binding law. It would signal only that the wish of the British people is to leave the EU, and would spark negotiations to begin setting the terms for separation.
Those negotiations could start quickly. Indeed, there happens to be an EU leaders summit the following week. The U.K. government may invoke Article 50 of the Lisbon Treaty, which states that "Any Member State may decide to withdraw from the Union in accordance with its own constitutional requirements." That would begin a two-year period before negotiations would have to be complete and Britain would have to exit.
It's also possible that Article 50 won't be invoked at all, and negotiations could take place in a more relaxed and amicable fashion.
Regardless, there are three main areas the divorce lawyers will be fighting over:
Either way, nothing legally changes on June 24. But the intermittent period of uncertainty could be very damaging indeed. Would EU members cease hiring U.K. workers immediately? Would companies stop investing in the U.K. until they have clarity on the future of trade agreements? Would U.K. banks start moving jobs to Europe immediately in order to prepare for the worst-case scenario, as JPMorgan Chase CEO Jamie Dimon recently indicated could happen?
And that period of uncertainty could prolong itself for well over two years. Even the start of negotiations could be delayed for months if there is a change of government. Prime Minister David Cameron maintains that he will not resign regardless of the result of the vote. But there would be huge pressure for him to do so in the event of an "out" vote. The choosing of a new leader and government would have to come before separation discussions could even begin.
The exact consequences of a possible "Brexit" are uncertain, since no country has ever pulled out of the EU.
Opinion polls currently indicate that the British public favors staying in the European Union, but the "in" camp's lead is small — somewhere around 2 percentage points.