Formal language is a style of English used in certain situations, such as official notices and letters. It uses particular words and phrases that make it different from everyday English, but it has other features as well.
You can't smoke here! (informal English)
Smoking is prohibited. (formal English)
Formal language often uses the passive voice ('is prohibited') and it is also more impersonal in tone, avoiding pronouns like I, we and you.
Contractions (leaving out letters in a word) such as 'can't' and exclamation marks are not normally used in official language.