I want to know the difference between two words; they are used in literal texts.
Both similes and metaphors are a way of comparing one thing to another. The difference is that with a simile, you say that A is similar to B, but with a metaphor you simply say that A is B.
He was as big and hairy as a mammoth. (Simile)
He was a big, hairy mammoth. (Metaphor -- unless you are really talking about a mammoth)