The best way to recognize a metaphor is examine how the author is playing with language. Part of the element of a metaphor that makes it so compelling is that there is a sense of playfulness with language that allows the writer to be able to connect a concept to another through a series of images or mental pictures, or language that is reserved for one thing, but actually is meaning to link it to another. One way to pay attention to this is to examine where the author is going. What images is the author employing in their technique and writing? When you are able to identify the pictures being created, then one would be able to sense where the metaphors are present. Nietzsche once said that "Truth is a mobile army of metaphors." This might be an excellent guide to the recognition of metaphors, as the more one notices how an author is re-describing reality through different connections, metaphors emerge, allowing the reader to better recognize their usage.
Most poems have a controlling metaphor; that is, the poet has written about something, someone, or some concept that he/she is comparing to something or someone else. This tension between the two parts being compared is the controlling metaphor.
The difficulty comes about with some poems because metaphors may take one of four forms, depending on whether the literal or figurative terms are repectively named or just implied. Here are the four variations of metaphor:
1. Both the terms, literal and figurative are named. [this is one already mentioned: "Juliet is the sun."]
2. The literal term is named, but the figurative one is implied. [snake is mentioned, implying evil]
3. The literal term is implied and the figurative one is named. [Dickinson's "a narrow fellow in the grass," implying a snake]
4. Both the terms, literal and figurative are implied. (Of course, this is the hardest to identify. [Wallace Stevens's "Sunday Morning" has this type of metaphor: His first line begins, "Complacencies of the peignoir" in a poem in which a woman meditates on questions of deth, mutabillity and permanence. The woman is drawn to these questions in the first stanza.]
To use Robert Frost's short poem, "Fire and Ice," as an example, the reader knows that Frost compares both Fire and Ice to hatred even though the literal word is implied, especially when he agrees in great understatement--"Ice will also suffice"--that both Fire and Ice can equally destroy the world.
A metaphor is a literary device where an author compares two things to each other, but only does so indirectly. That is, the author does not say "my love is like a red red rose." That would be a simile.
So, to find a metaphor in a poem, look for something that is being compared to something else. So, if a poet said "my life is a dream," that would be a metaphor. For an example from Shakespeare -- it's not poetry, it's Romeo and Juliet. But Romeo says "but soft, what light through yonder window breaks? It is the east, and Juliet is the sun." In that case, he is comparing her to the sun, but he is not saying she is "like" the sun.
Are you trying to find a metaphor in a particular poem?