You know what an essay is. It's that piece you had to write in school, hopefully not (but probably) the night before it was due, about a subject such as What Freedom Means to You—at least five pages, double-spaced, and don't even try to get away with anything larger than a 12-point font. (Kudos for thinking to tweak the margins, though.)
You might also know that essay can be a verb, with its most common meaning being "to try, attempt, or undertake":
A very close approach to the evil of Idi Amin is essayed in Giles Foden's 1998 novel The Last King of Scotland, whose narrator is the Scottish personal physician to the dictator.
— Norman Rush, The New York Review of Books, 7 Oct. 2004
The principal accidents she remembers, before last summer's, involved chipping a couple of teeth while, as a fifth grader, she was essaying a back flip off a diving board,...
— E. J. Kahn, Jr., The New Yorker, 17 Aug. 1987
The verb assay, meanwhile, is used to mean "to test or evaluate" and can be applied to anything from laboratory samples to contest entries:
He bounced from job to job, working on a shrimp boat and later for Pan American Laboratories assaying chemicals coming in from Mexico.
— Steve Clark, The Brownville Herald, 21 Apr. 2017
"Each burger will be assayed by visitors and a panel of judges, including local chefs Jen Knox, Gina Sansonia, Judith Able, Bret Hauser, Camilo Cuartas and Peter Farrand."
— Phillip Valys, SouthFlorida.com, 19 May 2017
While this distinction might seem clear-cut on the surface, there exists a great deal of historical overlap between essay and assay. The two words derive from the same root—the Middle French essai, which ultimately derives from a Late Latin noun, exagium, meaning "act of weighing."
At one time, assay and essay were synonyms, sharing the meaning "try" or "attempt." In the 17th century, an essay was an effort to test or prove something:
Edmond: I hope, for my brother's justification, he wrote this but as an essay or taste of my virtue.
— William Shakespeare, King Lear, 1606
For the modern noun use of essay to mean "a written exploration of a topic," we can almost certainly thank Michel de Montaigne (1533-1592), a French writer noted for working in the form. Borrowing a word that emphasized their identity as literary "attempts," Montaigne devised Essais as a title for the vignette-typed pieces that he began publishing in 1580 and spanned over a thousand pages, covering subjects as varied and wide-ranging as solitude, cannibalism, and drunkenness.
Those last ones probably won't be in the final exam.