From the outside (I am not British), it looks like the awful immigration politics of Frau Merkel have a lot to do with the results.
I think now the EU will try to minimize the impact. Maybe they will offer the UK a special status on condition they do not respect the result. Hope that British people does not accept it.
Scotland and Northern Irelanf voted against Brexit. Another likely effect is a second referendum for independence in Scotland, and a referendum for the reunification of Ireland.