A Metaphor is a figure of speech in which one thing is spoken of as if it were another. The two things are alike in some respects but different in most particulars. A metaphor is an assumed simile, like or as never being used to express the similarity.

When Lowell says:

"There's never a leaf nor a blade too mean To be some happy creature's palace." he calls leaves and blades of grass palaces, and so uses a metaphor.

When you say that a person who is cross or rude is a bear, you have used a metaphor; when you say he is like a bear when things go wrong, you have used a simile.