Example of a simile: Whenever I talked to Linda, she was so disgustingly cheerful it was like she vomited rainbows all over my face.
Example of a metaphor: Love is a battlefield.
Nope, couldn't find a good picture for that one that didn't involve Pat Benatar.
Anyway, you get the point. Both are often used in literature, though comparisons like these are most effective when used sparingly.
Though I've found that they're just as effective when they're royally effed up by the author (maybe on purpose) or by the speaker. Then they become what's known as the super-awesome "mixed metaphor."
Mixed metaphors are what happens when someone smushes two comparisons together, making a ridiculously illogical comparison. They happen to everyone, and have hilarious results. Sometimes what the speaker or author meant isn't changed by the incorrect phrase, and sometimes it's clear as mud.
My personal all-time favorite that I use in real life is, "It's not rocket surgery." Obviously this little phrase is a mash-up of, "It's not rocket science," and, "It's not brain surgery," yet the meaning is still clear, at least in this case. Here, courtesy of this article, are some other mixed metaphors. Some still make sense, some, well, not so much.
"So now what we are dealing with is the rubber meeting the road, and instead of biting the bullet on these issues, we just want to punt." (Chicago Tribune, cited by The New Yorker, August 13, 2007)
"Top Bush hands are starting to get sweaty about where they left their fingerprints. Scapegoating the rotten apples at the bottom of the military's barrel may not be a slam-dunk escape route from accountability anymore." (Frank Rich, The New York Times, July 18, 2008)
"Federal Judge Susan Webber Wright stepped up to the plate and called a foul." (Catherine Crier, The Case Against Lawyers, 2002)
"Her saucer-eyes narrow to a gimlet stare and she lets Mr. Clarke have it with both barrels." (Anne McElvoy, London Evening Standard, Sep. 9, 2009)
"That's awfully thin gruel for the right wing to hang their hats on." (MSNBC, Sep. 3, 2009)
Some of those actually gave me a headache trying to figure them out. But don't hesitate to enjoy a good mixed metaphor...in small doses, they might even be what your story needs. You can use them to break tension, to show a character's personality, or just to be creative, especially in dialogue. No one gets things right 100% of the time when speaking, so why should your characters be any different? Most of all, have fun with them.