One of the issues which was deliberately confused by the Leave side during the referendum campaign was the border; and specifically the issue of “movement”.
There are three distinct things here, about which the Leave side on occasions overly lied.
There is movement of people; movement of labour; and movement of goods and services.
Movement of people is handled by the Schengen Agreement, which applies to 22 EU member states plus Switzerland, Norway, Iceland and some microstates (Andorra, San Marino, Monaco and Liechtenstein). This means that a single entry visa qualifies a person for entry into any of the territories covered, and there are ordinarily no passport checks on people travelling between them (although these may be instituted in emergencies). Notably the UK and Ireland are outside this Agreement; they have their own arrangement, known as the Common Travel Area, whereby each country treats the other’s citizens as their own (with some very minor exceptions concerning voting rights of UK citizens in Ireland).
Movement of labour is covered by the European Economic Area (EEA), which is the entire EU plus Norway, Iceland and Liechtenstein (strictly speaking the most recent EU member state, Croatia, is not yet a full member of the EEA). This means that any citizen of any of those states may seek work in another, and may not be discriminated against on the basis of nationality.
Movement of goods and services is covered by the European Union Customs Union, which is the entire EU plus Turkey, three microstates (Andorra, San Marino and Monaco) and all other UK territory in Europe (including the Isle of Man and the Channel Islands).
All EU member states are members of the European Economic Area (EEA) guaranteeing free movement of labour, and of the European Union Customs Union guaranteeing free movement of goods and services; but no non-EU state is a member of both.
If the UK were to leave the EU, it would need to decide if it wished to remain within the EEA and/or the Customs Union. If it remained within the EEA, there would be no restriction for UK or EU nationals working on either side of the Irish border and probably no passport checks, but there would be customs checks (that is the case, for example, between Norway and Sweden). If it remained within the Customs Union but not the EEA, there would be no customs checks but working rights would be restricted on either side of the border and, notwithstanding the Common Travel Area, there may need to be passport checks (that is the case between Turkey and Greece). The exact outcome depends on how strict the UK (or EU) wished to be on immigration; and on whether Northern Ireland attained any special status.
Legally, therefore, there is much to concern those of us who wish the Irish border to remain relatively open to a free flow of people, labour and trade. In practice, I do not doubt something will be worked out to enable, at the very least, free flow of people and access to employment for Irish citizens in the UK.