This is a hardy perennial in the academic world. The difference is drummed into every school student and every examination-taker with monotonous regularity and promptly ignored ever after once the examination has been done and dusted.
The two words tend to be conflated together as if they have the same meaning: as if they were a synonymous pair. They don’t: and they aren’t. In marking schedules for essays, separate proportions of marks are set aside for allocation to each of them, and woe betide anyone who does not make a difference between them. Depending on the state of the spleen of the marker, if no distinction is made between the two words, one whole portion of the marking schedule can end up attracting a big fat zero.
To compare something requires some other thing, preferably relatively similar, to be set alongside it so that similarities can be perceived. The object of the exercise – and this is the thing that seems to have been lost – is to show how alike two or more things are, and although the things which are different may be important, it is not the strict point of a comparison.*
To contrast two things, on the other hand, is to show the differences between them. Isolating and identifying the differences is the point of the exercise. It does require an act of conscious will not to stray into comparison: but that strictness is the point of the exercise.
The purpose of using a compare/contrast question is to test the mental discipline of the examinee: to provide an opportunity for them to demonstrate their ability to analyse according to strict criteria. As the examinee goes further up the greasy academic poll, they may expect their method to be assessed as rigorously as one’s underlying understanding of the topic. Method and process are basic elements of the scientific method and of the medieval liberal arts curricula which preceded it.
A quick analytical question to finish: which of the two instructions do you think I was carrying out in this post?
*The only time when this is not true is in the absence of the word “contrast”, when by common usage we sometimes, usefully, stray into showing things which are not similar. But this is an informal usage and gives rise to much of the problem discussed here.