a : it's amazing to watch this film
b : to wacth this film is amazing
In this pattern, it has no meaning. It is used only to fill the subject position in the sentence. Thus, it is called introductory “it”.
A and B mean the same thing, but sentence B is more common and useful than A. A was introduce mainly to make the meaning of B easier to understand.
Introductory “it” can fill the position both of the subject and object.