It's more complex than it appears. I often take umbrage (silently) at what I perceive as the misuse of these words, and there is even a blog devoted to the subject. **
However, it's not as simple as it seems. A dictionary editor explains in a Slate column, citing "misuses" by Alcott, Twain, Fitzgerald, Joyce and others:
The earliest uses of literally were "in a literal manner; word for word" ("translated literally from Greek") and "in a literal sense; exactly" ("He didn't mean that literally").More at the link. The reasoning seems to be a little circular to me, but the take-home message seems to be that seasoned authors and copy editors are willing to be flexible about these words.
By the late 17th century, though, literally was being used as an intensifier for true statements. The Oxford English Dictionary cites Dryden and Pope for this sense; Jane Austen, in Sanditon, wrote of a stormy night that, "We had been literally rocked in our bed." In these examples, literally is used for the sake of emphasis alone...
Eventually, though, literally began to be used to intensify statements that were themselves figurative or metaphorical...
In the case of literally, the "right" meaning is said to be "exactly as described; in a literal way," because that's what the base word literal is supposed to mean. In fact, the literal meaning of literal would be something like "according to the letter," but it's almost never used this way. "He copied the manuscript literally" would be one possible example. So when we use literally to refer to something other than individual letters—to whole words, or to thoughts in general—we are already walking down the figurative path, and if we end up with people eating curry so hot that their mouths are "literally on fire," how surprised can we be?
** "wordies" visiting TYWKIWDBI should check the blogroll in the right sidebar at this link for additional grammar- and language-related blogs. There are several excellent ones there.