First research your topic. Or if it is some opinion essay, then think about it. Then, prepare a blueprint of your thoughts: you will have many facts or thoughts about your essay, organise where you will place them in your essay. Divide your essay in paragraphs, no more than 7 to 8 lines in a paragraph. Also, always make your first paragraph as introduction and last as conclusion, write all other stuff in between them. Also, a pro tip that if essays are not entirely factual, then the teacher looks for your opinion in the essay, so don't forget to mention it. This doesn't apply to scientific essays, for example you can't write, "Mitochondria is a really good cell organelle, we should respect it."