Codility saves your code automatically. If you close the browser window and open it again, you will resume where you left off. You can work on more than one task simultaneously - that is, you can move freely among the tasks without having submitted solutions. When you have completed a task and are sure your solution is ready, click the “Submit” button. You will not be able to modify this solution after submitting it.
If for whatever reason you are unable to click "Submit" (e.g. you lost the connection), once the time runs out, everything that was present in the IDE at that moment will be submitted automatically as your final submission.