Most slang words are spoken to express one's feelings. For example, sometimes we say dirty words to show our angry or amazement. To escape from censorship, we use "草泥马"(muddy horse in the grass) to represent "操你妈" (f**k). They are the same in pronunciation, but different in tone. The funny thing is, someone produced an entirely new meaning of the word "草泥马" ---- now it means alpacas! With its new meaning, when we speak "草泥马", others will not feel much offended, because they recall the funny alpaca's smile!
Another slang word I like is "囧". It is very self-explanatory: it shows a face with an embarrassed expression. However, originally it has nothing to do with a face. It is an ancient word, which can only be found in the thickest dictionary and means "bright". It was dug up by someone 5 years ago, and then it is popular around China.
Slang words' life-span is short. Although the two slang words I mentioned above live for years, other slang words are not as lucky as them. Some of slang words only lasted for months, then disappeared, because people were tired of them.
If you are learning Mandarin, my suggestion is: try to remember some love-live slang words, but never use any slang words. They are informal.
P.S.: Is the word "slang word" suitable? I cannot find a suitable word to represent the meaning I want to express...