The United Kingdon has voted to leave the European Union in an historic referendum that divided the nation.