Formal language is language that one would use when speaking to someone of great importance or rank.
<em>Examples:</em>
<em>The queen, president, or other world leader</em>
You would not use slang while speaking or writing in formal language. Slang should only be used when speaking to close friends or family if you are speaking in a comfortable non-formal way. :)