Slang are words that are informal. Usually each generation or social group has its own slang - for example, older people can have trouble understanding the slang of younger people. On the other hand, younger people often understand, but find silly or old-fashioned, the slang of older people.
Over time, language tends to get more complex, since new words enter much faster than old words leave. Over time, slang almost always becomes part of the language, and approved for use by all.
It has also happened that some words used in Anglo-Saxon for bodily functions became thought of as profanity or rude after they were replaced by Latinate words like "urinate", "defecate" and "copulate" - which polite people were supposed to use after the Norman conquest of England in 1066. This was in part a way of making poor people (who spoke Anglo-Saxon) all appear to be rude, while more powerful people (who spoke Norman) appeared to be polite - one way that etiquette can develop, and reinforce power structure. This is only one example from history of how racism can be a reason for defining one group's language as 'slang' and another as 'correct'.
Wanting to have rules of grammar that do not change and the same vocabulary used by everyone for better communication is another reason that is often given for defining one group's language as correct.
An "idiom" can be slang, but it can also be a metaphor that becomes part of the culture.
Two examples of slang are 'wassup' and 'dunnow'. 'Wassup' usually means 'What is up?' (as in, 'How are you?'), and 'dunnow' usually means 'I don't know'.