A metaphor is a technique that compares two (or more) things directly- i.e, without drawing attention to the comparison. For example- ´Claire rubbed her eyes and breathed deeply, her head a storm.´ The author, by stating Claire´s head /is/ a storm, conveys directly to the reader the sensation of disturbance and confusion the character is feeling, with additional connotations of danger. This works as the reader is aware they are not being told something literal- and yet, the literal presentation conveys the character´s feelings automatically, and so the effect is felt deeply. Authors use metaphors to convey ideas and sensations vividly to their readers, with the additional room for connotations to impart further meaning and affect.
A simile is a comparison of two (or more) things indirectly- that is, with attention drawn to the comparison. In a similar example: ´Claire rubbed her eyes and breathed deeply, taking a slow breath, trying to settle her thoughts- but they roiled and collided in her head like a raging storm, and she could not focus on anything.´ Here, the attention is drawn to the comparison with the word ´like´- the author distances the objects being compared by stating the comparison. This may not convey the sensation as directly as the metaphor, but it feels more natural, akin to daily speech, and so the character´s voice is more intimately felt.