Used as above, 'it' is a dummy subject. It has no meaning, but provides a subject for a clause that otherwise wouldn't have one.
Smickey, the expression "It is not allowed to smoke here" is perfectly good grammatical English, but your teacher may be thinking of these things:
1. For a notice to be fixed on a wall, "It is not allowed to smoke here" has too many words, and would be harder to read from a distance than "NO SMOKING".
2. Expressions using "It is ... " or "It is not" are formal
Formal: It is not allowed to swim in the river.
Less formal: It isn't allowed to swim in the river.
Informal or conversational: You can't swim in the river.
Terse (on a notice): NO SWIMMING
Fluent native speakers are good at knowing which level of formality to use, whereas non-native learners tend to mix them in the same piece of writing or speech. The concept is called 'register'.