This isn't necessarily the case. Many EU migrants will be able to claim residency in the UK if they meet certain criteria.
In all likelihood the UK will join the EEA and retain free movement, but even if not, economic migration will still be encouraged and a visa system will be in place, just as the country has for the rest of the world.