You can't write outside of the lines as it won't be marked - they scan the papers in and any little annotations or arrows you've done won't be seen.
If you run out of space, you put your hand up, and the invigilator will come and give you some special exam board lined paper. You write in the margin of this paper the question number, and then you continue to answer the question on this paper.
At the end of the exam, you will be given treasury tags to attach this paper to your exam.