Slang and idioms ?Idiom: groups of two or more words
'Idiom: groups of two or more words that taken together mean something different from the literal meaning of the individual words. Slang: informal speech that is outside conventional or standard usage and consists both of coined words and phrases and of new or extended meanings attached to established terms.'
For a more specific definition we can look to http://en.wikipedia.org/wik, which offers the following detailed account of the two terms.
Idiom: 'An idiom is an expression (i.e. term or phrase) whose meaning cannot be deduced from the literal definitions and the arrangement of its parts, but refers instead to a figurative meaning that is known only through conventional use. In linguistics, idioms are figures of speech that contradict the principle of compositionality.'
Common features of idioms:
Non-compositionality: The meaning of a collocation is not a straightforward composition of the meaning of its parts. For example, the meaning of kick the bucket has nothing to do with kicking buckets. (Kick the bucket means to die.) See also collocational restriction.
Non-substitutability: We cannot substitute a word in a collocation with a related word. For example, we cannot say kick the pail instead of kick the bucket although both bucket and pail are synonyms.
Non-modifiability: We cannot modify a collocation or apply syntactic transformations. For example, John kicked the green bucket or the bucket was kicked has nothing to do with dying. (Although John kicked his bucket and John´s bucket was kicked are both valid)
Slang: The non-standard or non-dialectal use of words in a language of a particular social group, and sometimes the creation of new words or importation of words from another language. Slang can be described as way of deviating from standard language use, and is very popular in adolescence. Slang functions in two ways; the creation of new language and new usage by a process of creative informal use and adaptation, and the creation of a secret language understood only by those within a group intended to understand it. As such, slang is a type of sociolect aimed at excluding certain people from the conversation. Slang initially functions as encryption, so that the non-initiate cannot understand the conversation, or as a further way to communicate with those who understand it. Slang functions as a way to recognize members of the same group, and to differentiate that group from the society at large. Slang terms are often particular to a certain subculture, such as musicians, skateboarders, and drug users. Slang generally implies playful, informal speech.
'Any port in a storm This means that in an emergency any solution will do, even one that would normally be unacceptable.
'As mad as a hatter This simile means that someone is crazy or behaves very strangely. In the past many people who made hats went insane because they had a lot of contact with mercury.
'You can´t make a silk purse out of a sow´s ear If something isn´t very good to start with, you can´t do much to improve it.
Slang: 'Rabbit. Verb To talk, often unceasingly. Abb. Rhyming slang, from Rabbit and Pork. 'Gander. Noun A look. E.g 'Will you have a gander at my job application, and check it for spelling mistakes'' 'Gasper. Noun A cigarette. [Early 1900s]
When trying to differentiate between slang and idiom, the following definition is offered by http://www.usingenglish.com/reference/idioms/: 'Idiom is yesterday's slang and slang is tomorrow's idiom. In other words, idiom is slang that has, through use and over time, become acceptable to use in informal language.'