What does "it" refer to?

Dear teachers,

Please read:

I hate it when people are too serious.

What does “it” refer to?
It = when people are too serious?
Coul you tell me the rule in this case?

Thanks
Quoc

Hi Quoc,

You asked:

You could also say:

I hate people being too serious where people being serious is like an object of hate

When you say I hate it when, it you are using the pronoun it to anticipate/expect the next sentence: when people are too serious.

Alan