EU exit agreement:
The Treaties would cease to be applicable to that State from the date of the agreement or, failing that, within two years of the notification unless the State and the Council both agree to extend this period.
In plain speak: Someone says they want out. They formally notify the EU body politik. The EU drags their feet for whatever reason. 2 years and its done. Kaput. Finished. Fin. Over and done with. The exiting member need only refuse to extend negotiations.