What does Britain leaving the EU mean?

832

Britain has voted to leave the EU. What does that mean both for Britain and the European Union?