In language, there is formal speech and there is slang—what some linguists metaphorically call “sprinkles of color.” These are basically words that emerge from particular groups that use words from that formal language but are assigned a different meaning or subtext. For example, the slang “he gets my goat” means nothing near the literal translation of it. In fact, people who are not familiar with the language may ask, “What goat? And how did he get it? And what does this have to do with the rest of the story?” Actually, the phrase means “he annoyed me.”
Slang is a kind of code, and can (initially) enforce a sense of belonging within the group. People can create slang in order to communicate without getting caught, as in the case of teenagers who can revert to particular phrases that their parents would never even begin to decipher. However, true slang occurs when those words penetrate the general population, who “adopt” the phrase and its new meaning even if they don’t particularly understand the history behind it. For example, nobody knows why coffee is called a “a cup of Joe” or why a bathroom is called “a John” but most American English speakers will understand someone when he says, “I’ve had to many Joe’s, now I need to go to the John.”
Slang, unlike jargon (or technical words) tends to be humorous, playful and sometimes shocking. It is rarely considered polite (except for some, like “ok” which are now part of the English lexicon). Slang also tends to fall in and out of use very quickly, and can be associated with a particular generation or period in history. However, there are a few that have survived the centuries (like “beat it”).