Regardless of the text (poems, short stories, novels, etc.) one is required to compare and contrast, one must define what elements he or she wishes to compare and contrast. When comparing two or more texts, one must define the elements which both texts possess. On the other hand, contrasting two or more texts refers to the elements which one text possesses and the other does not.
For example, a person could compare how two different texts treat similar themes. The person would define how each text defines, illustrates, and addresses the presentation of the common theme.
Let us, then, say that while both texts have a common theme, the authors of each use different poetic devices, characterizations, or dialogue to illustrate the theme.
Another example could define two different sides of an argument (as defined in two different essays). For example, while both essays address the same topic, each possesses a very different tone, point-of-view, or method of presenting ideas.
When comparing and contrasting poetry, one can compare and contrast the poet's use of literary devices, tone, structure, message, theme, or rhyme scheme (just to name a few).