A comparative analytical essay compares two things--perhaps two people, two texts, or two historical events, for instance--and explores the things that are similar and the things that make them different. Writing a comparative analysis is great practice for writing other types of academic papers, so students can expect to write a good number of these during their school career. While it's called a comparative analysis, you will actually need to both compare and contrast in this type of essay.
Make a list of things that are similar and different about your two subjects. After examining the list, develop a thesis statement for your paper. A thesis statement will be the hook which all your points will hang on, and a more complex thesis will incorporate both a similarity and difference.
Choose a format for your essay. The text-by-text format, or parallel-order comparison, is when you first make thesis statement in the introduction, then discuss a first similarity, in the first work then the second one. Then a second similarity, text by text. Next do the differences. In a point-by-point format, thesis is followed by a first point, and how the two things differ on the point, then how they are the same on that point. Have two more sections or so organized that way.
Write a conclusion that refers back to the thesis statement while avoiding merely summarizing what's already been stated in the body of the paper.