Britain is schizophrenic, it has one face pointed eastwards towards the European continent and one pointed westwards towards the United States and the Commonwealth that was once its Empire. The reason that the United Kingdom joined the EU in 1973 was because after WWII there was a wind of change and joining together for security was the zeitgeist of Europe to avoid another intra-European conflict. Also, having lost its Empire, trade with the Commonwealth could not make up for that loss.
But, two things happened, first the waves of immigrants, from the rest of the EU to the UK (mainly from Poland) and from the Middle East and Africa, and second, the sense of loss of sovereignty, with important decisions being made by nameless and faceless bureaucrats in Brussels and not British representatives in Westminster. Finally, the breakdown of the economic basis of the Eurozone, with the northern tier (principally Germany) dominating the southern tier (Greece, Portugal, Italy and Spain).
A British majority voted for Brexit and so did the current Parliament and this week PM Theresa May triggered Article 50 and Britain became the first country to actually leave the EU. How this will affect the EU itself as well as the UK remains to be seen. There is no doubt that initially it will be a struggle for the UK, since the EU will not make it easy for the UK, ie. a hard exit, rather than an easy one that might tempt other countries to leave. A hard Brexit means that the UK will not have access to the EU’s huge market of 550 million people without tariffs as it did as a member of the EU. The question is whether or not bilateral trade deals between the UK and other countries such as the US and China can take up the slack and allow the UK to retain its high standard of living.