Believe it or not, all of the assignments, class work, and exams you'll need to complete in order to pass a class are not defined as torture. Taken together, they're simply defined as coursework, and its purpose is to help you learn and prove that you've learned what you're supposed to, no matter how torturous it may feel at the time.

An essay is a short, informative piece of writing with an introductory paragraph, three or more body paragraphs, and a conclusion. Using the four types of essays (persuasive, narrative, expository, or descriptive) a writer presents a topic and convinces a reader to see it their way, tells a story about it, gives information about it, or describes it to a reader.
All of the work required when taking a class is considered coursework. Reading sections from a textbook, answering questions about it, writing an essay about your thoughts on it, and taking a test that proves you understood it are all different examples of coursework.
Teachers and professors create a plan for teaching their course by laying out what coursework they'll ask students to do. In college courses, that plan is written out in a syllabus that lets a student know what will be expected of them during the course and how their grades will be determined based on their performance of that coursework.
The point of an essay is to inform readers through a short piece of writing on a particular topic using a common writing style. Sometimes, an essay's intent is to persuade, sometimes the writer tries to provoke an emotional reaction, and sometimes they just want to present the facts, allowing readers can draw their own conclusions.
The point of coursework is to help students learn and to show that they understand what they've learned. Each piece may be weighted differently in terms of their importance to determining a student's grade, but all coursework is usually considered important in completing a class.
Teachers and professors often use different mediums as part of their required coursework to increase student learning. Some students learn best by reading, some by listening, and some by applying what they've learned in their writing. For that reason, the different types of coursework required in individual classes may vary widely.