More often than not the timing of an essay question in an English exam is what causes students to panic, and I know it can seem daunting when facing a time limit to write a clear and coherent answer to a question you've seen never seen before. The important thing to remember is not to panic, going in with a clear head is much better than going in already panicking before having even seen the question. There isn't a set limit as to how much you have to write in the given time, so don't worry if your friend is writing 12 pages in the same time that you only wrote 6 pages, it's the quality of the content that matters.
Say for example you have an hour to answer the question, you should first of all set aside five minutes at the start to read the question, making sure you understand it and highlight any key terms which you're being asked to address. I personally find it beneficial to create a plan detailing what I'm going to talk about, as this saves time when writing the essay and makes sure you don't go astray talking about irrelevant things. It doesn't have to be a very detailed plan, it might just have the headings of each paragraph, but enough to make sure that you can write the essay without stopping at the end of each paragraph trying to think of your next point. Lastly, try and leave five minutes at the end for you to read over your work, go through and make sure there are no glaring spelling/grammar mistakes, and make sure you have addressed the key terms of the question.