In all likelihood the UK will retain access to the single market through membership of the EEA and EFTA.
This does mean the UK will have to continue allowing free movement.
That said, members of the EEA have the power (under Article 112 of the EEA Agreement) to place an "emergency brake" on free movement if "serious economic, societal or environmental difficulties" liable to persist are arising.
Although much of the leave vote was driven by opposition to uncontrolled migration, and continued participation in the single market will be seen by many as backtracking on this, this power (which the UK does not currently have as an EU member state) should be a sufficient degree of control for most.
I think Switzerland put some limitations to free movement recently. The EU retaliated by removing access to student programs like ERASMUS for Swiss citizens. A nasty story.
If this is true, it's quite counter-productive. It's in EU interest to send as much people as possible on Erasmus and be pro-EU. Banning will backfire on the long run. I hope some kind of solution for UK students can be forged. Majority of young ppl in UK voted remain, is would be terrible to punish them.
https://en.wikipedia.org/wiki/European_Economic_Area