In its usual sense, literally means exactly, in a strict sense, or to the letter. For example, when someone says, “I am literally foaming at the mouth,” this literally means real foam is coming out of his or her mouth. Figuratively means in a metaphorical sense—that is, not in a real sense but in a way that is expressed through figures of speech. So when someone says, “I am figuratively foaming at the mouth,” we can infer that he or she is using the idiom foaming at the mouth, which means very angry, and that no mouth foam is actually present.
These are the traditional senses of the words, anyway. But there is no ignoring the fact that literally is often used as an intensifier—essentially synonymous with very or truly. This use of the word is much decried and has not gained traction in English reference sources, in edited texts, or among careful writers, but it is common. With this use, when someone says, “I am literally foaming at the mouth,” this just means he or she is very angry. This sense of literally may soon gain acceptance, but for now it is widely viewed as an error.