That is a difficult question to answer. There are several reasons for writing an essay.
1. To provide information on a topic.
2. To present an argument or a point of view about an issue.
3. To raise a question in the minds of the readers.
I'm sure there are other reasons. The first step is to select a topic and decide if your essay will be informational, persuasive, or questioning.
After that, make a list of points you would like to cover and then rearrange those points in a logical sequence. Once you have made an outline, use the outline to divide the essay into paragraphs. Each point should have at least one paragraph. Some opints will require more than one. Often, some research will be involved to make certain that facts, figures, and dates are accurate. Then you write. Then you revise. Then you write again.
Let's take the general topic of "Thomas Jefferson".
1. Informational: This would be a short biography of TJ. When and where was he born? Where did he live and go to school? What was his profession? How did he get involved with politics? What did he do in government before the presidency? What did he believe and do as President? The point is to provide information about the man.
2. Persuasive: What is Jeffersonian Democracy? If you decide that you liked his view of democracy, write an essay to persuade others that his point of view was correct and was the best at the time or would be the best today. If you decide that you don't prefer his view, write to persuade others that Jeffersonian Democracy is wrong.
3. Questioning: This type of essay raises questions. As the author, you are not required to answer the questions. Jefferson owned slaves. Yet he wrote in the Declaration of Independence that "all men are created equal". How could these two things be true of any man? This type of essay is difficult. It requires learning a great deal about the times and the mindsets of people at that time.
I hope this helps. If you have further questions, please ask.